summaryrefslogtreecommitdiff
path: root/doalogwatch
diff options
context:
space:
mode:
Diffstat (limited to 'doalogwatch')
-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