1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-11-20 01:52:32 +01:00
This commit is contained in:
GilbN 2022-03-20 20:27:28 +00:00
parent e0be4885f7
commit ce0aede223

View File

@ -1,20 +1,20 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
echo '------------------' echo '------------------'
echo '| theme.park |' echo '| theme.park |'
echo '------------------' echo '------------------'
# Display variables for troubleshooting # Display variables for troubleshooting
echo -e "Variables set:\\n\ echo -e "Variables set:\\n\
'TP_DOMAIN'=${TP_DOMAIN}\\n" 'TP_DOMAIN'=${TP_DOMAIN}\\n"
if [[ -z ${TP_DOMAIN} ]]; then if [[ -z ${TP_DOMAIN} ]]; then
echo 'No domain set, defaulting to $http_host' echo 'No domain set, defaulting to $http_host'
TP_DOMAIN='$http_host' TP_DOMAIN='$http_host'
fi fi
DEFAULT='/config/nginx/site-confs/default' DEFAULT='/config/nginx/site-confs/default'
if ! grep -q "sub_filter 'https://theme-park.dev' \$scheme://${TP_DOMAIN};" ${DEFAULT}; then if ! grep -q "sub_filter 'https://theme-park.dev' \$scheme://${TP_DOMAIN};" ${DEFAULT}; then
sed -i "s/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT} sed -i "s/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT}
sed -i "s/sub_filter 'https:\/\/develop.theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT} sed -i "s/sub_filter 'https:\/\/develop.theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT}
fi fi