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