annotate debian/dcc-client.init @ 5:0a7a5940ee3a

Change description per license
author Peter Gervai <grin@grin.hu>
date Tue, 10 Mar 2009 15:03:24 +0100
parents f6716cb00029
children c7785b85f2d2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
1 #!/bin/sh
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
2 #
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
3 # dcc-client example file to build /etc/init.d/ scripts.
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
4 # This file should be used to construct scripts for /etc/init.d.
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
5
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
6 PATH=/sbin:/bin:/usr/sbin:/usr/bin
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
7 DAEMON=/usr/sbin/dccifd
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
8 NAME=dccifd
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
9 DESC="DCC program interface daemon"
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
10
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
11 test -f $DAEMON || exit 0
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
12
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
13 set -e
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
14
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
15 case "$1" in
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
16 start)
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
17 echo -n "Starting $DESC: $NAME"
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
18 start-stop-daemon --start --quiet --pidfile /var/run/dcc/$NAME.pid \
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
19 --chuid dcc:dcc --exec $DAEMON -- $OPTIONS
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
20 echo "."
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
21 ;;
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
22 stop)
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
23 echo -n "Stopping $DESC: $NAME"
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
24 start-stop-daemon --oknodo --stop --quiet --exec $DAEMON
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
25 echo "."
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
26 ;;
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
27 restart)
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
28 echo -n "Restarting $DESC: $NAME"
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
29 start-stop-daemon --stop --quiet --pidfile \
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
30 /var/run/dcc/$NAME.pid --exec $DAEMON
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
31 sleep 1
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
32 start-stop-daemon --start --quiet --pidfile \
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
33 /var/run/dcc/$NAME.pid --exec $DAEMON -- $OPTIONS
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
34 echo "."
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
35 #echo "\n"
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
36 ;;
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
37 *)
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
38 N=/etc/init.d/$NAME
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
39 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
40 echo "Usage: $N {start|stop|restart}" >&2
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
41 exit 1
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
42 ;;
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
43 esac
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
44
f6716cb00029 Replace buggy stuff in deb dir, never make phone calls while working
Peter Gervai <grin@grin.hu>
parents:
diff changeset
45 exit 0