From 01c4847fb85365c12201e3d20484ba9f6e9821f0 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Sun, 9 Jun 2024 18:47:05 +0100 Subject: Attempt to set args better --- monitor.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/monitor.sh b/monitor.sh index 685e66e..6a8d5fe 100755 --- a/monitor.sh +++ b/monitor.sh @@ -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 -- cgit v1.2.3