Skip to content

Commit

Permalink
Attempt to set args better
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3 committed Jun 9, 2024
1 parent a8f7a54 commit 01c4847
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ else
fi;
fi;

ADDITIONAL_ARGS=$(if [[ -n "$WATCH_EVENTS" ]]; then echo "-e $WATCH_EVENTS"; else echo ""; fi)
if [ -n "$WATCH_EVENTS" ]; then
ADDITIONAL_ARGS="-e $WATCH_EVENTS"
else
ADDITIONAL_ARGS=""
fi

while inotifywait $ADDITIONAL_ARGS -r /opt/monitor; do
$HOOK_SCRIPT
Expand Down

0 comments on commit 01c4847

Please sign in to comment.