docker-nginx-auto/app/reloader.sh
2021-08-20 17:02:57 -04:00

15 lines
301 B
Bash
Executable File

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