Repair and simplify installCDE.src:CleanDaemons()
authorMatthew R. Trower <dev@blackshard.net>
Tue, 30 Oct 2018 13:56:44 +0000 (08:56 -0500)
committerJon Trulson <jon@radscan.com>
Sun, 4 Nov 2018 17:33:13 +0000 (10:33 -0700)
cde/admin/IntegTools/dbTools/installCDE.src

index f9665f91a1f902010ceaa9e0265548f62ac7a187..a00fefd13aa5f1134b72b50f8f172c8c202ab5b1 100755 (executable)
@@ -201,25 +201,10 @@ CleanDaemons()
       then
         stopsrc -s inetd >>$LOGFILE 2>&1
       fi
-    elif [ "$PLATFORM" = "openbsd" ] || [ "$PLATFORM" = "freebsd" ] || \
-        [ "$PLATFORM" = "netbsd" ] || [ "$PLATFORM" = "linux" ]
-    then
-      pgrep pid,comm > /tmp/tmppsout
-      if [ -s /tmp/tmppsout ]
-      then
-        awk '{print "kill " $1}' /tmp/tmppsout | /bin/sh -f
-        sleep 2
-      fi
     else    
-      pgrep -v pgrep >/tmp/tmppsout
-      if [ -s /tmp/tmppsout ]
-      then
-        awk '{print "kill " $2}' /tmp/tmppsout | /bin/sh -f
-        sleep 2
-      fi
+      ps -eo pid,comm | grep $i | awk '{print "kill " $1}' | /bin/sh
     fi
   done
-  rm -f /tmp/tmppsout
 }
 
 RestartInetd()