wok view busybox/stuff/zcip @ rev 4327

Fix: avidemux have shared libs (and no desktop file)
author Christophe Lincoln <pankso@slitaz.org>
date Wed Sep 30 00:57:40 2009 +0200 (2009-09-30)
parents 72fa50265748
children
line source
1 #!/bin/sh
2 # /etc/init.d/zcip: Start, stop and restart ZeroConf deamon on SliTaz, at boot
3 # 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
10 . /etc/network.conf
12 NAME=Zcip
13 DESC="ZeroConf deamon"
14 DAEMON=/sbin/zcip
15 OPTIONS=$ZCIP_OPTIONS
16 PIDFILE=/var/run/zcip.pid
17 [ -n "$OPTIONS" ] || OPTIONS="$INTERFACE /etc/zcip.script"
19 case "$1" in
20 start)
21 if active_pidfile $PIDFILE zcip ; then
22 echo "$NAME already running."
23 exit 1
24 fi
25 echo -n "Starting $DESC: $NAME... "
26 $DAEMON $OPTIONS && echo `pidof $DAEMON` > $PIDFILE
27 status
28 ;;
29 stop)
30 if ! active_pidfile $PIDFILE zcip ; then
31 echo "$NAME is not running."
32 exit 1
33 fi
34 echo -n "Stopping $DESC: $NAME... "
35 kill `cat $PIDFILE`
36 rm $PIDFILE
37 status
38 ;;
39 restart)
40 if ! active_pidfile $PIDFILE zcip ; then
41 echo "$NAME is not running."
42 exit 1
43 fi
44 echo -n "Restarting $DESC: $NAME... "
45 kill `cat $PIDFILE`
46 rm $PIDFILE
47 sleep 2
48 $DAEMON $OPTIONS
49 status
50 ;;
51 *)
52 echo ""
53 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
54 echo ""
55 exit 1
56 ;;
57 esac
59 exit 0