diff options
author | Erich Eckner <git@eckner.net> | 2022-02-06 21:47:34 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2022-02-06 21:47:34 +0100 |
commit | 444a0606d754c19129841e54d6019c48df2fbd73 (patch) | |
tree | 08c7073a8dbeda34d4d60c84b744b0f0860256b4 | |
parent | 356af1bfbd8040368b29431dca409668ef648e9f (diff) | |
download | crypt-expiry-check-444a0606d754c19129841e54d6019c48df2fbd73.tar.xz |
systemd files new
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | crypt-expiry-check.service.in | 6 | ||||
-rw-r--r-- | crypt-expiry-check.timer.in | 11 |
4 files changed, 23 insertions, 2 deletions
@@ -3,3 +3,5 @@ crypt-expiry-check.cron man.commons *.common *.1 +crypt-expiry-check.service +crypt-expiry-check.timer @@ -24,10 +24,11 @@ ETCDIR = /etc CRONDIR = /etc/cron.daily BINDIR = /usr/bin MANDIR = /usr/share/man +SYSTEMDDIR = /usr/lib/systemd/system VERSION = 4.2 -all: man.commons crypt-expiry-check crypt-expiry-check.cron crypt-expiry-check.1 +all: man.commons crypt-expiry-check crypt-expiry-check.cron crypt-expiry-check.1 crypt-expiry-check.service crypt-expiry-check.timer %: %.in sed "s/#VERSION#/$(VERSION)/; s@#CRONDIR#@$(CRONDIR)@; s@#BINDIR#@$(BINDIR)@; s@#ETCDIR#@$(ETCDIR)@" $< > $@ @@ -43,7 +44,8 @@ all: man.commons crypt-expiry-check crypt-expiry-check.cron crypt-expiry-check.1 .PHONY: install dist clean install: all - install -D -m0755 crypt-expiry-check.cron $(DESTDIR)$(CRONDIR)/crypt-expiry-check + [ -z "$(CRONDIR)" ] || install -D -m0755 crypt-expiry-check.cron $(DESTDIR)$(CRONDIR)/crypt-expiry-check + [ -z "$(SYSTEMDDIR)" ] || install -D -m0644 crypt-expiry-check.service crypt-expiry-check.timer $(DESTDIR)$(SYSTEMDDIR)/crypt-expiry-check install -D -m0755 -t $(DESTDIR)$(BINDIR) crypt-expiry-check install -D -m0644 -t $(DESTDIR)$(MANDIR)/man1 crypt-expiry-check.1 install -D -m0644 -t $(DESTDIR)$(ETCDIR) crypt-expiry.checks diff --git a/crypt-expiry-check.service.in b/crypt-expiry-check.service.in new file mode 100644 index 0000000..18e320d --- /dev/null +++ b/crypt-expiry-check.service.in @@ -0,0 +1,6 @@ +[Unit] +Description=check expiry of surveilled keys/certificates + +[Service] +Environment=MAILTO=me@example.com +ExecStart=#BINDIR#/crypt-expiry-check -qa -e $MAILTO -f #ETCDIR#/crypt-expiry.checks diff --git a/crypt-expiry-check.timer.in b/crypt-expiry-check.timer.in new file mode 100644 index 0000000..e153ba5 --- /dev/null +++ b/crypt-expiry-check.timer.in @@ -0,0 +1,11 @@ +[Unit] +Description=check expiry of surveilled keys/certificates twice a day + +[Timer] +AccuracySec=1us +OnBootSec=15min +OnUnitActiveSec=12h +RandomizedDelaySec=1h + +[Install] +WantedBy=timers.target |