summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2024-01-10 19:33:31 +0100
committerErich Eckner <git@eckner.net>2024-01-10 19:33:31 +0100
commit498f03439cccfcd79d6a73afd3bdafe9eee8eb0e (patch)
tree8b903b37d1c918e0ad1f698fefbfd29b92a01b43
parent3661e0f42e16b4a3a3636324731ba4f3127def2d (diff)
downloadshutdownasap-498f03439cccfcd79d6a73afd3bdafe9eee8eb0e.tar.xz
shutdownasap: use pgrep
-rwxr-xr-xshutdownasap.in7
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