From a1f8d625497b45f7a00c7560698e5928e641829f Mon Sep 17 00:00:00 2001 From: redxef Date: Sat, 19 Aug 2023 02:56:15 +0200 Subject: [PATCH] Also sort result of inotifywait. --- start-nginx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start-nginx.sh b/start-nginx.sh index 166d305..c01c38a 100755 --- a/start-nginx.sh +++ b/start-nginx.sh @@ -43,7 +43,7 @@ run_inotifywait() { echo "monitoring the following files:" echo "$wait_files" matched_files="$(echo "$wait_directories" | inotifywait --fromfile=- -e close_write -e modify -e create)" - if [[ -n "$(comm -12 <(echo "$matched_files") <(echo "$wait_files"))" ]]; then + if [[ -n "$(comm -12 <(sort <<< "$matched_files") <(echo "$wait_files"))" ]]; then nginx -s reload fi done