diff options
author | Erich Eckner <git@eckner.net> | 2016-09-20 13:13:00 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-09-20 13:13:00 +0200 |
commit | 9e98c1b473488c70ec9e845f531b71dabdb6569f (patch) | |
tree | 44836fd92112691602d7f0006da911b912b2a2a1 | |
parent | 5d862f9785c128bd0e34294014a63169c3b740e3 (diff) | |
download | logwatch-extra-9e98c1b473488c70ec9e845f531b71dabdb6569f.tar.xz |
fix PID-lookup
-rwxr-xr-x | doalogwatch.in | 3 |
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}" |