5 # this is brittle: the primary server must have the lowest PPID
6 # this is brittle: ps behavior is very platform-specific, only tested on Debian Etch
9 PROCPID
=$
(ps x
-o pid
,ppid
,args
--sort ppid |
grep "$target" |
grep -v grep |
head -1 |
awk '{print $1}');
11 if [ ! $PROCPID ] ; then
12 echo "No processes found for $target";
16 echo "SIP Processes for this user ($USER):";
17 ps x
-o pid
,ppid
,args
--sort ppid |
grep "$target" |
grep -v grep ;
18 echo "Killing process #$PROCPID";