From d44fd0169fcb9ba3debcaab38b526c7c7bf96d61 Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Sat, 1 Sep 2018 17:52:19 -0700 Subject: sv: include runit service files to run cron drop-in scripts Closes: #6 [via git-merge-pr] --- sv/Makefile | 12 ++++++++++++ sv/snooze-daily/finish | 2 ++ sv/snooze-daily/run | 3 +++ sv/snooze-hourly/finish | 2 ++ sv/snooze-hourly/run | 3 +++ sv/snooze-monthly/finish | 2 ++ sv/snooze-monthly/run | 3 +++ sv/snooze-weekly/finish | 2 ++ sv/snooze-weekly/run | 3 +++ 9 files changed, 32 insertions(+) create mode 100644 sv/Makefile create mode 100755 sv/snooze-daily/finish create mode 100755 sv/snooze-daily/run create mode 100755 sv/snooze-hourly/finish create mode 100755 sv/snooze-hourly/run create mode 100755 sv/snooze-monthly/finish create mode 100755 sv/snooze-monthly/run create mode 100755 sv/snooze-weekly/finish create mode 100755 sv/snooze-weekly/run diff --git a/sv/Makefile b/sv/Makefile new file mode 100644 index 0000000..d97cc39 --- /dev/null +++ b/sv/Makefile @@ -0,0 +1,12 @@ +DESTDIR= +SYSCONFDIR=/etc +SVDIR=$(SYSCONFDIR)/sv + +install: FRC + for f in daily hourly weekly monthly; do \ + mkdir -p $(DESTDIR)$(SVDIR)/snooze-$$f; \ + install -m0755 snooze-$$f/run snooze-$$f/finish \ + $(DESTDIR)$(SVDIR)/snooze-$$f/; \ + done + +FRC: diff --git a/sv/snooze-daily/finish b/sv/snooze-daily/finish new file mode 100755 index 0000000..a080f71 --- /dev/null +++ b/sv/snooze-daily/finish @@ -0,0 +1,2 @@ +#!/bin/sh +exec touch /var/cache/snooze/daily diff --git a/sv/snooze-daily/run b/sv/snooze-daily/run new file mode 100755 index 0000000..1e6ce55 --- /dev/null +++ b/sv/snooze-daily/run @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p /var/cache/snooze +exec snooze -s 1d -t /var/cache/snooze/daily -- run-parts --lsbsysinit /etc/cron.daily diff --git a/sv/snooze-hourly/finish b/sv/snooze-hourly/finish new file mode 100755 index 0000000..8a364b5 --- /dev/null +++ b/sv/snooze-hourly/finish @@ -0,0 +1,2 @@ +#!/bin/sh +exec touch /var/cache/snooze/hourly diff --git a/sv/snooze-hourly/run b/sv/snooze-hourly/run new file mode 100755 index 0000000..6dc1f73 --- /dev/null +++ b/sv/snooze-hourly/run @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p /var/cache/snooze +exec snooze -H \* -s 1h -t /var/cache/snooze/hourly -- run-parts --lsbsysinit /etc/cron.hourly diff --git a/sv/snooze-monthly/finish b/sv/snooze-monthly/finish new file mode 100755 index 0000000..7188324 --- /dev/null +++ b/sv/snooze-monthly/finish @@ -0,0 +1,2 @@ +#!/bin/sh +exec touch /var/cache/snooze/monthly diff --git a/sv/snooze-monthly/run b/sv/snooze-monthly/run new file mode 100755 index 0000000..2497fb3 --- /dev/null +++ b/sv/snooze-monthly/run @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p /var/cache/snooze +exec snooze -d 1 -s 28d -t /var/cache/snooze/monthly -- run-parts --lsbsysinit /etc/cron.monthly diff --git a/sv/snooze-weekly/finish b/sv/snooze-weekly/finish new file mode 100755 index 0000000..8f61339 --- /dev/null +++ b/sv/snooze-weekly/finish @@ -0,0 +1,2 @@ +#!/bin/sh +exec touch /var/cache/snooze/weekly diff --git a/sv/snooze-weekly/run b/sv/snooze-weekly/run new file mode 100755 index 0000000..3a18e74 --- /dev/null +++ b/sv/snooze-weekly/run @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p /var/cache/snooze +exec snooze -w 0 -s 7d -t /var/cache/snooze/weekly -- run-parts --lsbsysinit /etc/cron.weekly -- cgit 1.4.1