diff options
author | Erich Eckner <git@eckner.net> | 2019-09-18 10:22:39 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-09-18 10:22:39 +0200 |
commit | 13574649e92630f85a6e6d592b1cb4d9b128002f (patch) | |
tree | 53d3c757dbd08282fe555edc55bcb09267928883 | |
parent | 1b7cabb8b940cb9e17a94bb173ebde6d70a3cae8 (diff) | |
download | logwatch-extra-13574649e92630f85a6e6d592b1cb4d9b128002f.tar.xz |
systemd unit and timer new
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | doalogwatch.service.in | 5 | ||||
-rw-r--r-- | doalogwatch.timer | 11 |
4 files changed, 21 insertions, 2 deletions
@@ -1,2 +1,3 @@ doalogwatch doalogwatch.cron +doalogwatch.service @@ -27,11 +27,12 @@ CACHEDIR = /var/cache MANDIR = /usr/share/man LOGWATCHDIR = /usr/share/logwatch TMPDIR = /tmp +SYSTEMDDIR = /usr/share/systemd/system WAITDIR = /home/shutdown/.warteauf VERSION = 0.8.2 -all: doalogwatch doalogwatch.cron +all: doalogwatch doalogwatch.cron doalogwatch.service %: %.in sed "s/#VERSION#/$(VERSION)/; \ @@ -43,11 +44,12 @@ all: doalogwatch doalogwatch.cron s@#TMPDIR#@$(TMPDIR)@" \ $< > $@ -.PHONY: install dist clean +.PHONY: all install dist clean install: all install -D -m0755 -t $(DESTDIR)$(BINDIR) doalogwatch install -D -m0755 doalogwatch.cron $(DESTDIR)$(CRONDIR)/doalogwatch + install -D -m0655 -t $(DESTDIR)$(SYSTEMDDIR) doalogwatch.service doalogwatch.timer install -d $(DESTDIR)$(CACHEDIR)/logwatch install -D -m0644 -t $(DESTDIR)$(LOGWATCHDIR)/default.conf/services dummy.conf install -D -m0644 -t $(DESTDIR)$(LOGWATCHDIR)/scripts/services dummy diff --git a/doalogwatch.service.in b/doalogwatch.service.in new file mode 100644 index 0000000..9ad9619 --- /dev/null +++ b/doalogwatch.service.in @@ -0,0 +1,5 @@ +[Unit] +Description=report a logwatch + +[Service] +ExecStart=#BINDIR#/doalogwatch diff --git a/doalogwatch.timer b/doalogwatch.timer new file mode 100644 index 0000000..79207f8 --- /dev/null +++ b/doalogwatch.timer @@ -0,0 +1,11 @@ +[Unit] +Description=repeatedly try to report a logwatch + +[Timer] +AccuracySec=1us +RandomizedDelaySec=1h +OnCalendar=*-*-* *:00:00 +Persistent=true + +[Install] +WantedBy=timers.target |