comparison debian/dcc-server.init @ 2:f6716cb00029

Replace buggy stuff in deb dir, never make phone calls while working
author Peter Gervai <grin@grin.hu>
date Tue, 10 Mar 2009 14:29:12 +0100
parents
children c7785b85f2d2
comparison
equal deleted inserted replaced
1:9b8d79ac0dc3 2:f6716cb00029
1 #!/bin/sh
2 #
3 # dcc-server example file to build /etc/init.d/ scripts.
4 # This file should be used to construct scripts for /etc/init.d.
5
6 PATH=/sbin:/bin:/usr/sbin:/usr/bin
7 DAEMON=/usr/sbin/dccd
8 NAME=dcc-server
9 DESC="Distributed Checksum Clearinghouse server"
10
11 test -f $DAEMON || exit 0
12
13 if [ -f /etc/default/dcc-server ]; then
14 . /etc/default/dcc-server
15 else
16 echo "Missing file /etc/default/dcc-server"
17 exit 1
18 fi
19
20 set -e
21
22 case "$1" in
23 start)
24 echo -n "Starting $DESC: $NAME"
25 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
26 --chuid dcc:dcc --exec $DAEMON -- $OPTIONS
27 echo "."
28 ;;
29 stop)
30 echo -n "Stopping $DESC: $NAME"
31 start-stop-daemon --oknodo --stop --quiet --exec $DAEMON
32 echo "."
33 ;;
34 restart)
35 echo -n "Restarting $DESC: $NAME"
36 start-stop-daemon --stop --quiet --pidfile \
37 /var/run/$NAME.pid --exec $DAEMON
38 sleep 1
39 start-stop-daemon --start --quiet --pidfile \
40 /var/run/$NAME.pid --exec $DAEMON -- $OPTIONS
41 echo "."
42 ;;
43 *)
44 N=/etc/init.d/$NAME
45 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
46 echo "Usage: $N {start|stop|restart}" >&2
47 exit 1
48 ;;
49 esac
50
51 exit 0