From f9d51f09dacfa9c0feeab3794815d387f4139596 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Sun, 9 Jun 2024 19:02:48 +0100 Subject: [PATCH] Correct conditionals for script delay --- monitor.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor.sh b/monitor.sh index 48c42a9..c40055c 100755 --- a/monitor.sh +++ b/monitor.sh @@ -17,7 +17,7 @@ else fi; fi; -if [ -n "$WATCH_EVENTS" ]; then +if [ -n "$INOTIFY_WATCH_EVENTS" ]; then ADDITIONAL_ARGS="-e $INOTIFY_WATCH_EVENTS" else ADDITIONAL_ARGS="" @@ -30,7 +30,7 @@ else fi while inotifywait $ADDITIONAL_ARGS -r $WATCH_DIR; do - if [ -z ${INOTIFY_HOOK_DELAY+x} ]; then + if [ ! -z ${INOTIFY_HOOK_DELAY+x} ]; then echo "Waiting $INOTIFY_HOOK_DELAY until executing hook..." sleep $INOTIFY_HOOK_DELAY fi