Skip to content

Commit

Permalink
Correct conditionals for script delay
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3 committed Jun 9, 2024
1 parent 9ddea3b commit f9d51f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand All @@ -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
Expand Down

0 comments on commit f9d51f0

Please sign in to comment.