summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-05-21 22:18:15 +0200
committerErich Eckner <git@eckner.net>2016-05-21 22:18:15 +0200
commit4b766b3fbb32321d2fea77bf387c6eb6a389e30d (patch)
tree988ca319cd4ba8ae72931978021308beb2bd7886
parent1e10cfb4e9b44b67e792245831525e9a2c172df2 (diff)
downloadlogwatch-extra-4b766b3fbb32321d2fea77bf387c6eb6a389e30d.tar.xz
letzteMeldung nicht mehr bei "make install" erzeugen
-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"