mirror of
https://github.com/linuxserver/docker-phpmyadmin.git
synced 2026-02-20 08:40:43 +08:00
commit
326576ba90
@ -1,13 +1,14 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
mkdir -p \
|
||||
/config/phpmyadmin \
|
||||
/app/www/public/tmp
|
||||
|
||||
if [ ! -f /config/phpmyadmin/config.secret.inc.php ]; then
|
||||
cat > /config/phpmyadmin/config.secret.inc.php <<EOT
|
||||
cat >/config/phpmyadmin/config.secret.inc.php <<EOT
|
||||
<?php
|
||||
\$cfg['blowfish_secret'] = '$(tr -dc 'a-zA-Z0-9~!@#$%^&*_()+}{?></";.,[]=-' < /dev/urandom | fold -w 32 | head -n 1)';
|
||||
\$cfg['blowfish_secret'] = '$(tr -dc 'a-zA-Z0-9~!@#$%^&*_()+}{?></";.,[]=-' </dev/urandom | fold -w 32 | head -n 1)';
|
||||
EOT
|
||||
fi
|
||||
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
DEFAULT_CONF="/config/nginx/site-confs/default.conf"
|
||||
OLD_ROOT="root /app/phpmyadmin;"
|
||||
NEW_ROOT="root /app/www/public;"
|
||||
|
||||
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}" 2>/dev/null;then
|
||||
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}" 2>/dev/null; then
|
||||
echo "updating root in ${DEFAULT_CONF}"
|
||||
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user