diff options
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | doalogwatch.in | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -48,7 +48,6 @@ install: all install -D -m0755 -t $(DESTDIR)$(BINDIR) doalogwatch install -D -m0755 doalogwatch.cron $(DESTDIR)$(CRONDIR)/doalogwatch install -d $(DESTDIR)$(CACHEDIR)/logwatch - date +%F > $(DESTDIR)$(CACHEDIR)/logwatch/letzteMeldung clean: rm -f doalogwatch{,.cron} diff --git a/doalogwatch.in b/doalogwatch.in index ad1d931..b9366b0 100755 --- a/doalogwatch.in +++ b/doalogwatch.in @@ -5,6 +5,11 @@ abWannNaechstesMal="$(date +%F)" lmDatei="#CACHEDIR#/logwatch/letzteMeldung" +if ! [ -r "${lmDatei}" ] +then + echo '1970-01-01' > "${lmDatei}" +fi + [ "${abWannNaechstesMal}" == "$(cat "${lmDatei}")" ] && exit 0 warteAufFile="#WAITDIR#/logwatch" |