Only restart upon close_wrie or modify.

This commit is contained in:
redxef 2023-02-24 01:39:16 +01:00
parent 6c798da8ae
commit 553dfaced3
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -38,7 +38,7 @@ run_nginx() {
run_inotifywait() {
while find "$dstdir" -type f -exec \
sed -En '/ssl_certificate/ s/^\s*ssl_certificate(_key)? (.*);.*$/\2/p' {} \; | sort | uniq | \
inotifywait --fromfile=-; do
inotifywait --fromfile=- -e close_write -e modify; do
nginx -s reload
done
}