diff options
author | Erich Eckner <git@eckner.net> | 2024-01-10 19:33:31 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2024-01-10 19:33:31 +0100 |
commit | 498f03439cccfcd79d6a73afd3bdafe9eee8eb0e (patch) | |
tree | 8b903b37d1c918e0ad1f698fefbfd29b92a01b43 | |
parent | 3661e0f42e16b4a3a3636324731ba4f3127def2d (diff) | |
download | shutdownasap-498f03439cccfcd79d6a73afd3bdafe9eee8eb0e.tar.xz |
shutdownasap: use pgrep
-rwxr-xr-x | shutdownasap.in | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/shutdownasap.in b/shutdownasap.in index 6a4acc1..8912543 100755 --- a/shutdownasap.in +++ b/shutdownasap.in @@ -75,11 +75,6 @@ do i=1 fi sleep 1 - prozesse=$( - ps aux \ - | grep -v grep \ - | grep -vF 'rsync --daemon --no-detach' - ) nochwarten=false @@ -122,7 +117,7 @@ do for s in "${!shutDownNoGoProcesses[@]}" do - if echo "${prozesse}" | grep -q "\(\s\|/\)${shutDownNoGoProcesses[${s}]}\(\$\|\s\)" + if pgrep -af "\(\s\|/\)${shutDownNoGoProcesses[${s}]}\(\$\|\s\)" then nochwarten=true if ! ${quiet}; then |