List monitored files.

This commit is contained in:
redxef 2023-08-19 01:51:29 +02:00
parent 553dfaced3
commit 197cd684c0
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -37,7 +37,8 @@ run_nginx() {
run_inotifywait() {
while find "$dstdir" -type f -exec \
sed -En '/ssl_certificate/ s/^\s*ssl_certificate(_key)? (.*);.*$/\2/p' {} \; | sort | uniq | \
echo 'Monitoring the following files for changes:'
sed -En '/ssl_certificate/ s/^\s*ssl_certificate(_key)? (.*);.*$/\2/p' {} \; | sort | uniq | tee /dev/stderr \
inotifywait --fromfile=- -e close_write -e modify; do
nginx -s reload
done