quietly check for apache procs, filtering out our grep
authorChris Sharp <csharp@georgialibraries.org>
Fri, 12 Jan 2018 23:09:34 +0000 (18:09 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 12 Jan 2018 23:09:34 +0000 (18:09 -0500)
templates/setup-head.sh

index a3661f0..533b827 100755 (executable)
@@ -206,7 +206,7 @@ systemctl stop apache2
 echo;echo killing apache2 processes just in case...
 sleep 3
 ps -ef | grep apache2 | grep -v grep | awk '{print $2}' | xargs kill
-if ps -ef | grep apache2
+if ps -ef | grep apache2 | grep -vq grep
 then
        echo;echo
        echo "apache2 processes are still running please kill them manually"