]> git.netwichtig.de Git - user/henk/code/snooze.git/commitdiff
sv: only invoke run-parts if the directory exists
authorCameron Nemo <camerontnorman@gmail.com>
Sat, 24 Nov 2018 03:28:06 +0000 (19:28 -0800)
committerLeah Neukirchen <leah@vuxu.org>
Thu, 29 Nov 2018 15:31:15 +0000 (16:31 +0100)
Closes: #7 [via git-merge-pr]
sv/snooze-daily/run
sv/snooze-hourly/run
sv/snooze-monthly/run
sv/snooze-weekly/run

index 45b4d07f519cc4137b6553b2fa044da271f07b45..ee629a74a11d14b32825957781b721528f7c3645 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 mkdir -p /var/cache/snooze
 exec snooze -s 1d -t /var/cache/snooze/daily -- sh -c \
-       "run-parts --lsbsysinit /etc/cron.daily; : > /var/cache/snooze/daily"
+       "test -d /etc/cron.daily && run-parts --lsbsysinit /etc/cron.daily; : > /var/cache/snooze/daily"
index d9a3f0b321aa17e163bd30b486de54f55d271975..053392e9c829f92cb3d7d472f2c0ef1a6dad7fa1 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 mkdir -p /var/cache/snooze
 exec snooze -H \* -s 1h -t /var/cache/snooze/hourly -- sh -c \
-       "run-parts --lsbsysinit /etc/cron.hourly; : > /var/cache/snooze/hourly"
+       "test -d /etc/cron.hourly && run-parts --lsbsysinit /etc/cron.hourly; : > /var/cache/snooze/hourly"
index f506a799729b381f523c23ec57363f3bb1ceb5f3..b83c5001073392ff0899a53450edd6665d89e59a 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 mkdir -p /var/cache/snooze
 exec snooze -d 1 -s 28d -t /var/cache/snooze/monthly -- sh -c \
-       "run-parts --lsbsysinit /etc/cron.monthly; : > /var/cache/snooze/monthly"
+       "test -d /etc/cron.monthly && run-parts --lsbsysinit /etc/cron.monthly; : > /var/cache/snooze/monthly"
index a3228c7e8c98b69a3a01c65fcde4833f74dce80d..0a6b8497be7b407e864999dbfcd30ac9eb4cbd50 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 mkdir -p /var/cache/snooze
 exec snooze -w 0 -s 7d -t /var/cache/snooze/weekly -- sh -c \
-       "run-parts --lsbsysinit /etc/cron.weekly; : > /var/cache/snooze/weekly"
+       "test -d /etc/cron.weekly && run-parts --lsbsysinit /etc/cron.weekly; : > /var/cache/snooze/weekly"