make compatible with nginx rebase

This commit is contained in:
aptalca
2022-09-01 09:13:56 -04:00
parent ad0b8298fb
commit afd0e52192
@@ -33,9 +33,12 @@ function wait_for_changes {
} }
while wait_for_changes; do while wait_for_changes; do
if /usr/sbin/nginx -c /config/nginx/nginx.conf -t; then if ! cat /etc/nginx/nginx.conf | grep "/config/nginx/nginx.conf"; then
export NGINX_CONF="-c /config/nginx/nginx.conf"
fi
if /usr/sbin/nginx ${NGINX_CONF} -t; then
echo "Changes to nginx config detected and the changes are valid, reloading nginx" echo "Changes to nginx config detected and the changes are valid, reloading nginx"
/usr/sbin/nginx -c /config/nginx/nginx.conf -s reload /usr/sbin/nginx ${NGINX_CONF} -s reload
else else
echo "Changes to nginx config detected but the changes are not valid, skipping nginx reload. Please fix your config." echo "Changes to nginx config detected but the changes are not valid, skipping nginx reload. Please fix your config."
fi fi