diff options
author | Cameron Nemo <camerontnorman@gmail.com> | 2018-11-23 19:28:06 -0800 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2018-11-29 16:31:15 +0100 |
commit | c95b0c00842219d98d43a5f859ecbb995e4d438e (patch) | |
tree | eac16d35392f9b96e3deb24b3b6627b2b4718ac5 | |
parent | 206eda3ca7b1e7a9cf51d2e630fcf62b45455997 (diff) | |
download | snooze-c95b0c00842219d98d43a5f859ecbb995e4d438e.tar.gz snooze-c95b0c00842219d98d43a5f859ecbb995e4d438e.tar.xz snooze-c95b0c00842219d98d43a5f859ecbb995e4d438e.zip |
sv: only invoke run-parts if the directory exists
Closes: #7 [via git-merge-pr]
-rwxr-xr-x | sv/snooze-daily/run | 2 | ||||
-rwxr-xr-x | sv/snooze-hourly/run | 2 | ||||
-rwxr-xr-x | sv/snooze-monthly/run | 2 | ||||
-rwxr-xr-x | sv/snooze-weekly/run | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/sv/snooze-daily/run b/sv/snooze-daily/run index 45b4d07..ee629a7 100755 --- a/sv/snooze-daily/run +++ b/sv/snooze-daily/run @@ -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" diff --git a/sv/snooze-hourly/run b/sv/snooze-hourly/run index d9a3f0b..053392e 100755 --- a/sv/snooze-hourly/run +++ b/sv/snooze-hourly/run @@ -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" diff --git a/sv/snooze-monthly/run b/sv/snooze-monthly/run index f506a79..b83c500 100755 --- a/sv/snooze-monthly/run +++ b/sv/snooze-monthly/run @@ -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" diff --git a/sv/snooze-weekly/run b/sv/snooze-weekly/run index a3228c7..0a6b849 100755 --- a/sv/snooze-weekly/run +++ b/sv/snooze-weekly/run @@ -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" |