]> git.ozlabs.org Git - ppp.git/blob - NeXT/Examples/pppdown
Cosmetic fix.
[ppp.git] / NeXT / Examples / pppdown
1 #!/bin/sh
2 #
3 # This script fill find processes with 'pppd' in the name 
4 # and send them SIGINT.  It must be run suid root to work
5 # correctly.  Some people don't like suid root shell scripts.
6 # In that case, check out the example pppkill.c which contains a
7 # C program that does the same thing.  This might be a bit safer
8 # to make suid root.
9 #
10 # Note: there is the potential that this script can kill more than
11 #       one process.  Maybe even an incorrect process.  It could 
12 #       probably be done better.
13 #
14
15 PATH=/usr/ucb:/bin:/usr/bin:/etc:/usr/etc:/usr/local/bin; export PATH
16
17 kill -INT `ps -ax | egrep "(pppd)" | egrep -v "egrep" | sed 's/^\([ 0-9]*\) .*/\1'/`
18 exit 0