docker-nginx-auto/app/reloader.sh

15 lines
298 B
Bash
Raw Normal View History

2021-08-20 11:28:41 -04:00
#!/bin/sh
. /root/common.sh
while inotifywait -q -r -e create -e modify -e delete -e move \
--exclude .swp "${CONF}"; do
if nginx -t; then
echo "reloader: new configuration"
"${BIN}" -s reload
RELOAD_FIRST=no /root/acme-autocert.sh
else
echo "reloader: invalid configuration"
fi
done