Also sort result of inotifywait.
This commit is contained in:
parent
50393ac177
commit
a1f8d62549
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ run_inotifywait() {
|
||||||
echo "monitoring the following files:"
|
echo "monitoring the following files:"
|
||||||
echo "$wait_files"
|
echo "$wait_files"
|
||||||
matched_files="$(echo "$wait_directories" | inotifywait --fromfile=- -e close_write -e modify -e create)"
|
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
|
nginx -s reload
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue