summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-08-12 09:32:22 +0200
committerErich Eckner <git@eckner.net>2018-08-12 09:32:22 +0200
commitc019773bf0454600645470ffa6a19b34dd396316 (patch)
treeee7b905221e5978be6763c739ae060aa1135431b
parent651b17ba1d153957b4f70859a45fbd9089c13a4f (diff)
downloadlogwatch-extra-c019773bf0454600645470ffa6a19b34dd396316.tar.xz
doalogwatch.in: unwritable warteAufFile is now non-fatal
-rwxr-xr-xdoalogwatch.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/doalogwatch.in b/doalogwatch.in
index 1f543a9..ab29607 100755
--- a/doalogwatch.in
+++ b/doalogwatch.in
@@ -20,7 +20,9 @@ warteAufFile="#WAITDIR#/logwatch"
grep -q "^$(cat "${warteAufFile}") \(\S*/\)\?doalogwatch\$" && \
exit 0
-echo $$ > "${warteAufFile}"
+if [ -d "${warteAufFile%/*}" ]; then
+ echo $$ > "${warteAufFile}"
+fi
[ -r #ETCDIR#/backup.conf ] && \
. #ETCDIR#/backup.conf