summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-09 21:24:30 +0200
committerErich Eckner <git@eckner.net>2016-04-10 08:20:25 +0200
commit398ea4ed3df305c2e7b9ce7c951f5165bd664627 (patch)
treedc200264a3f644a4b0e978b5a1d80238716b2686
parentdd4311e6a8c7ae9330237875012356904be6a98c (diff)
downloadlogwatch-extra-398ea4ed3df305c2e7b9ce7c951f5165bd664627.tar.xz
letzteMeldung nach /var/cache/logwatchv0.1
-rwxr-xr-xdoalogwatch7
1 files changed, 4 insertions, 3 deletions
diff --git a/doalogwatch b/doalogwatch
index 4909fee..d956659 100755
--- a/doalogwatch
+++ b/doalogwatch
@@ -3,8 +3,9 @@
set -o pipefail
abWannNaechstesMal="$(date +%F)"
+lmDatei="/var/cache/logwatch/letzteMeldung"
-[ "${abWannNaechstesMal}" == "$(cat /etc/logwatch/letzteMeldung)" ] && exit 0
+[ "${abWannNaechstesMal}" == "$(cat "${lmDatei}")" ] && exit 0
warteAufFile="/home/shutdown/.warteauf/logwatch"
touch ${warteAufFile} || exit 1
@@ -26,8 +27,8 @@ then
done
fi
-logwatch --archives --range "between $(cat /etc/logwatch/letzteMeldung) and yesterday" || exit 2
+logwatch --archives --range "between $(cat "${lmDatei}") and yesterday" || exit 2
-echo "${abWannNaechstesMal}" > /etc/logwatch/letzteMeldung
+echo "${abWannNaechstesMal}" > "${lmDatei}"
rm -f ${warteAufFile} || exit 1