1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-11-04 10:12:31 +01:00
theme.park/docker/root/etc/cont-init.d/50-config

20 lines
792 B
Plaintext
Raw Normal View History

2022-03-20 21:26:59 +01:00
#!/usr/bin/with-contenv bash
echo '------------------'
echo '| theme.park |'
echo '------------------'
# Display variables for troubleshooting
echo -e "Variables set:\\n\
'TP_DOMAIN'=${TP_DOMAIN}\\n"
if [[ -z ${TP_DOMAIN} ]]; then
echo 'No domain set, defaulting to $http_host'
TP_DOMAIN='$http_host'
fi
DEFAULT='/config/nginx/site-confs/default'
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}
2022-03-20 21:39:50 +01:00
sed -i "s/sub_filter 'https:\/\/develop.theme-park.dev' \$scheme:\/\/TP_DOMAIN;/sub_filter 'https:\/\/develop.theme-park.dev' \$scheme:\/\/${TP_DOMAIN}; /g" ${DEFAULT}
2022-03-20 17:16:25 +01:00
fi