X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=stop.sh;fp=stop.sh;h=dee68958009282737f9419cf45992bdbb512e8cc;hb=0e466aac11288f35b34d744b2652c7b4e9df2e24;hp=8d54dcc476f88271b9f6170dfe0bbace09238bf0;hpb=518bfb7a260f95e282f763878c2e9cf5ba58ef86;p=xogo.git diff --git a/stop.sh b/stop.sh index 8d54dcc..dee6895 100755 --- a/stop.sh +++ b/stop.sh @@ -1,5 +1,6 @@ #!/bin/sh # https://stackoverflow.com/questions/13939038/how-do-you-run-a-command-for-each-line-of-a-file -source ./.pid -kill -9 -`ps p $NODE_PID -o pgid | grep "[0-9]\+" | tr -d " "` +while read pid; do + kill -9 -`ps p $pid -o pgid | grep "[0-9]\+" | tr -d " "` +done <.pid