wok view lxnetdaemon/stuff/etc/init.d/lxnetdaemon @ rev 11042

Add pciids. This is so pciutils doesn't have to download anything.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Oct 16 07:54:18 2011 +0000 (2011-10-16)
parents
children 0c9b8959f9b7
line source
1 #!/bin/sh
2 # /etc/init.d/lxnetdaemon: Start, stop and restart LXnetdaemon deamon on
3 # SliTaz, at boot time or with the command line.
4 #
5 # To start daemon at boot time, just put the right name in the $RUN_DAEMONS
6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf.
7 #
8 . /etc/init.d/rc.functions
9 . /etc/daemons.conf
11 NAME=LXnetdaemon
12 DESC="Network daemon"
13 DAEMON=/usr/bin/lxnetdaemon
14 PIDFILE=/var/run/lxnetdaemon.socket
16 case "$1" in
17 start)
18 if [ -f $PIDFILE ] ; then
19 echo "$NAME already running."
20 exit 1
21 fi
22 echo -n "Starting $DESC: $NAME... "
23 $DAEMON $OPTIONS
24 status
25 ;;
26 stop)
27 if [ ! -f $PIDFILE ] ; then
28 echo "$NAME is not running."
29 exit 1
30 fi
31 echo -n "Stopping $DESC: $NAME... "
32 kill `cat $PIDFILE`
33 rm $PIDFILE
34 status
35 ;;
36 restart)
37 if [ ! -f $PIDFILE ] ; then
38 echo "$NAME is not running."
39 exit 1
40 fi
41 echo -n "Restarting $DESC: $NAME... "
42 kill `cat $PIDFILE`
43 rm $PIDFILE
44 sleep 2
45 $DAEMON $OPTIONS
46 status
47 ;;
48 *)
49 echo ""
50 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
51 echo ""
52 exit 1
53 ;;
54 esac
56 exit 0