wisski-cloud-distillery/distillery/utils/set_trusted_host.sh
Tom Wiesing f703f9865f
Add 'call-update-php-hack.sh'
This commit adds a hacky script that can manually call update.php.
2021-04-29 13:45:02 +02:00

13 lines
No EOL
518 B
Bash
Executable file

#!/bin/bash
# This utility script can be used to configure the trusted host settings inside of settings.php.
# It doesn't take care of corner cases and should only be used when needed.
INSTANCE_DOMAIN="$(hostname -f)"
INSTANCE_DOMAIN="${INSTANCE_DOMAIN%.wisski}"
TRUSTED_HOST_PATTERN="${INSTANCE_DOMAIN//\./\\\\.}"
TRUSTED_HOST_PATTERNS='["'$TRUSTED_HOST_PATTERN'"]'
echo "Setting 'trusted_host_patterns' to $TRUSTED_HOST_PATTERNS"
bash /utils/settings_php_set.sh 'trusted_host_patterns' "$TRUSTED_HOST_PATTERNS"