From 127ec18710fac464b8054e690accbb706a5e9859 Mon Sep 17 00:00:00 2001 From: thespad Date: Tue, 26 Nov 2024 15:57:16 +0000 Subject: [PATCH 1/2] Support BASE64 config input to match official image --- .../s6-overlay/s6-rc.d/init-phpmyadmin-config/run | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config/run b/root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config/run index 6340a4f..6273bdb 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config/run @@ -12,11 +12,19 @@ if [ ! -f /config/phpmyadmin/config.secret.inc.php ]; then EOT fi -if [ ! -f /config/phpmyadmin/config.user.inc.php ]; then +if [[ -n "${PMA_CONFIG_BASE64}" ]]; then + echo "${PMA_CONFIG_BASE64}" | base64 -d > /config/phpmyadmin/config.inc.php +fi + +if [[ -n "${PMA_USER_CONFIG_BASE64}" ]]; then + echo "${PMA_USER_CONFIG_BASE64}" | base64 -d > /config/phpmyadmin/config.user.inc.php +fi + +if [[ ! -f /config/phpmyadmin/config.user.inc.php ]]; then touch /config/phpmyadmin/config.user.inc.php fi -if [ ! -f /config/phpmyadmin/config.inc.php ]; then +if [[ ! -f /config/phpmyadmin/config.inc.php ]]; then cp /defaults/config.inc.php /config/phpmyadmin/config.inc.php fi From fcf6b03640f7b4ccfbe4a9a0fa22be1acf61b3ee Mon Sep 17 00:00:00 2001 From: thespad Date: Tue, 26 Nov 2024 15:58:03 +0000 Subject: [PATCH 2/2] Consistent comparison brackets --- root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config/run b/root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config/run index 6273bdb..09d2f40 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-phpmyadmin-config/run @@ -5,7 +5,7 @@ mkdir -p \ /config/phpmyadmin \ /app/www/public/tmp -if [ ! -f /config/phpmyadmin/config.secret.inc.php ]; then +if [[ ! -f /config/phpmyadmin/config.secret.inc.php ]]; then cat >/config/phpmyadmin/config.secret.inc.php <