From 498f03439cccfcd79d6a73afd3bdafe9eee8eb0e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 10 Jan 2024 19:33:31 +0100 Subject: shutdownasap: use pgrep --- shutdownasap.in | 7 +------ 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3-70-g09d2