summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rwxr-xr-xdoalogwatch.in5
2 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8284758..87ba85b 100644
--- a/Makefile
+++ b/Makefile
@@ -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"