aboutsummaryrefslogtreecommitdiffstats
path: root/net/rp-pppoe/files/04pppoe-server.sh.sample
blob: 6ed429c200b07da047dfa85b9d058aca2757a967 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh

# use a subshell to support new -CURRENT rc.d structure
(
daemon=pppoe-server
daemon_path=/usr/local/sbin
#daemon_flags=

case $1 in
    start)
        if [ -x ${daemon_path}/$daemon ]; then
            ${daemon_path}/$daemon $daemon_flags
            echo -n " $daemon"
        fi
        ;;
    stop)
        killall $daemon && echo -n " $daemon"
        ;;
    restart)
        $0 stop
        sleep 1
        $0 start
        ;;
    *)
        echo "Usage: `basename $0` {start|stop|restart}" >&2
        exit 64
        ;;
esac

exit 0
)