updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / pyntk-svn / ntkd.rc
blobc506fe625e3f614f393ac08111c0637571a2219b
1 #!/bin/bash
3 # /etc/rc.d/init.d/wimaxd
5 # description: start/stop the wimax daemon
7 . /etc/rc.conf
8 . /etc/rc.d/functions
10 DESC="Netsukuku"
11 NAME=ntkd
12 PNAME=ntkd
13 DAEMON=/usr/bin/ntkd
14 PIDFILE=/var/run/$NAME.pid
17 case "$1" in
18 start)
19 stat_busy "Starting Netsukuku"
20 $DAEMON > /dev/null 2>&1 &
21 if [ $? -gt 0 ]; then
22 stat_fail
23 else
24 add_daemon $NAME
25 stat_done
28 stop)
29 stat_busy "Stopping Netsukuku"
30 if [ -a $PIDFILE ]; then
31 PID=`cat $PIDFILE`
32 kill $PID > /dev/null
33 if [ $? -gt 0 ]; then
34 stat_fail
35 else
36 rm $PIDFILE
37 rm_daemon $NAME
38 stat_done
42 restart|force-reload)
43 $0 stop
44 sleep 1
45 $0 start
47 esac
48 exit 0