File: wmppp-stop

package info (click to toggle)
wmppp.app 1.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 288 kB
  • sloc: ansic: 647; makefile: 40; sh: 30
file content (18 lines) | stat: -rwxr-xr-x 433 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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