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..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,18 +5,26 @@ 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 < /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