From 9e20b628714735397fbd0e842c4c8fbb4599493f Mon Sep 17 00:00:00 2001 From: Yuki Joou Date: Sun, 10 Nov 2024 18:04:35 +0100 Subject: [PATCH] daemon: Added early exit check in case no packages are tracked --- pack2taskd.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pack2taskd.sh b/pack2taskd.sh index 9c22858..657e1e8 100755 --- a/pack2taskd.sh +++ b/pack2taskd.sh @@ -77,6 +77,8 @@ complete_reminder() { rmdir "$tmpdir" } +[ -z "$( ls -A "$PACKAGES_DIR/" )" ] && exit # No packages to check! + for package_file in "$PACKAGES_DIR"/*.json; do echo "$package_file" tracker_type=$(jq -r '.tracker' "$package_file")