dockapps/wmppp.app/wmppp/example-scripts/wmppp-stop
Carlos R. Mafra 21625f40b5 Initial dockapps git repo
I tried to get the latest versions from dockapps.org, but I haven't
tested any of them.

More dockapps will be added as time permits.
2011-03-25 19:45:13 +01:00

19 lines
434 B
Bash
Executable file

#!/bin/bash
DEVICE=ppp0
if [ -r /var/run/$DEVICE.pid ]; then
kill -INT `cat /var/run/$DEVICE.pid`
if [ ! "$?" = "0" ]; then
rm -f /var/run/$DEVICE.pid
echo >/dev/console "ERROR: Removed stale pid file"
exit 1
fi
echo >/dev/console "PPP link to $DEVICE terminated."
exit 0
fi
echo >/dev/console "ERROR: PPP link not active on $DEVICE"
exit 1