Fixed envsubst command in postinstall script

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2019-11-15 15:50:31 +01:00
parent a6393ae909
commit d2d60eb8bd
2 changed files with 17 additions and 17 deletions

View File

@ -1,19 +1,19 @@
<?php
$config['SITE_NAME'] = '$HOSTNAME';
$config['SITE_URL'] = 'http://' . $config['SITE_NAME'] . '/';
$config['DIR_BASE'] = '$DOCROOT/';
config['SITE_NAME'] = '$HOSTNAME';
config['SITE_URL'] = 'http://' . config['SITE_NAME'] . '/';
config['DIR_BASE'] = '$DOCROOT/';
$config['SMTP_DOMAIN'] = '$HOSTNAME';
$config['SMTP_FROMADDR'] = 'no-reply@' . $config['SMTP_DOMAIN'];
$config['ADMIN_EMAIL'] = 'admin@' . $config['SMTP_DOMAIN'];
config['SMTP_DOMAIN'] = '$HOSTNAME';
config['SMTP_FROMADDR'] = 'no-reply@' . config['SMTP_DOMAIN'];
config['ADMIN_EMAIL'] = 'admin@' . config['SMTP_DOMAIN'];
$config['DB_DRIVER'] = 'mysql';
$config['DB_PREFIX'] = '';
$config['DB_HOSTNAME'] = '$MYSQL_HOSTNAME';
$config['DB_USERNAME'] = '$MYSQL_USERNAME';
$config['DB_PASSWORD'] = '$MYSQL_PASSWORD';
$config['DB_DATABASE'] = '$MYSQL_DATABASE';
config['DB_DRIVER'] = 'mysql';
config['DB_PREFIX'] = '';
config['DB_HOSTNAME'] = '$MYSQL_HOSTNAME';
config['DB_USERNAME'] = '$MYSQL_USERNAME';
config['DB_PASSWORD'] = '$MYSQL_PASSWORD';
config['DB_DATABASE'] = '$MYSQL_DATABASE';
$config['SMARTHOST'] = '$SMARTHOST';
$config['SMARTHOST_PORT'] = '$SMARTHOST_PORT';
config['SMARTHOST'] = '$SMARTHOST';
config['SMARTHOST_PORT'] = '$SMARTHOST_PORT';

View File

@ -401,16 +401,16 @@ SOCKHELPER
fi
if [ -d "$DOCROOT" ]; then webui_install; fi
if [[ -d "$DOCROOT" ]]; then webui_install; fi
}
webui_install() {
chmod 770 "${DOCROOT}/tmp" "${DOCROOT}/images"
chown "${PILERUSER}:${DOCROOT}" "${DOCROOT}/tmp"
chown "$PILERUSER" "${DOCROOT}/tmp"
envsubst "${SCRIPT_DIR}/config-site.php.in" > "$CONFIG_SITE_PHP"
envsubst < "${SCRIPT_DIR}/config-site.php.in" | sed s%config%\$config%g > "$CONFIG_SITE_PHP"
echo "Done."
}