summaryrefslogtreecommitdiffstats
path: root/extra/knock/knockd
blob: 413e77a704a042f39c8fbbc793620c381c2450cc (plain)
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
32
33
34
35
36
37
#!/bin/sh
. /etc/sysconfig/rc
. $rc_functions

pidfile=/var/run/knockd.pid

case "$1" in
    start)
        boot_mesg "Starting KNOCKD Server..."
        loadproc /usr/sbin/knockd -d;;

    stop)
        boot_mesg "Stopping KNOCKD Server..."
        killproc /usr/sbin/knockd
        ;;

    reload)
        boot_mesg "Reloading KNOCKD Server..."
        reloadproc /usr/sbin/knockd
        ;;

    restart)
        $0 stop
        sleep 1
        $0 start
        ;;

    status)
        statusproc /usr/sbin/knockd
        ;;

    *)
        echo "Usage: $0 {start|stop|reload|restart|status}"
        exit 1
        ;;
esac