summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-09-20 13:13:00 +0200
committerErich Eckner <git@eckner.net>2016-09-20 13:13:00 +0200
commit9e98c1b473488c70ec9e845f531b71dabdb6569f (patch)
tree44836fd92112691602d7f0006da911b912b2a2a1
parent5d862f9785c128bd0e34294014a63169c3b740e3 (diff)
downloadlogwatch-extra-9e98c1b473488c70ec9e845f531b71dabdb6569f.tar.xz
fix PID-lookup
-rwxr-xr-xdoalogwatch.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/doalogwatch.in b/doalogwatch.in
index 5813071..1f543a9 100755
--- a/doalogwatch.in
+++ b/doalogwatch.in
@@ -16,7 +16,8 @@ warteAufFile="#WAITDIR#/logwatch"
[ -r "${warteAufFile}" ] && \
ps aux | \
- grep -q "^\S\+\s\+$(cat "${warteAufFile}")\s" && \
+ awk '{print $2" "$(NF)}' | \
+ grep -q "^$(cat "${warteAufFile}") \(\S*/\)\?doalogwatch\$" && \
exit 0
echo $$ > "${warteAufFile}"