Debian Codegraph @

contrib/distccd-init

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2 #
3 # distccd Debian init.d script contributed by Jason Thomas. (Debian #161136)
4 #
5 # skeleton example file to build /etc/init.d/ scripts.
6 # This file should be used to construct scripts for /etc/init.d.
7 #
8 # Written by Miquel van Smoorenburg <[email protected]>.
9 # Modified for Debian GNU/Linux
10 # by Ian Murdock <[email protected]>.
11 #
12 # Version: @(#)skeleton 1.9.1 08-Apr-2002 [email protected]
13 #
14
15 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binscip-shell filesystem . . `/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin`.
16 DAEMON=/usr/bin/distccdscip-shell filesystem . . `/usr/bin/distccd`.
17 NAME=distccd
18 DESC="Distributed Compiler Daemon"
19 DAEMON_ARGS="--nice=10 --port=4200 --pid-file=/var/run/$NAME.pid \
20 --log-file=/var/log/$NAME.log --daemon"
21
22 testscip-shell system . . test. -x $DAEMON || exit 0
23
24 set -e
25
26 # we need permission to write to the pid file
27 touchscip-shell system . . touch. /var/run/$NAME.pid
28 chownscip-shell system . . chown. distccd /var/run/$NAME.pid
29
30 case "$1" in
31 start)
32 echoscip-shell system . . echo. -n "Starting $DESC: $NAME"
33 start-stop-daemonscip-shell system . . start-stop-daemon. --start --quiet --pidfile /var/run/$NAME.pid \
34 --chuid distccd \
35 --exec $DAEMON -- $DAEMON_ARGS
36 echoscip-shell system . . echo. "."
37 ;;
38 stop)
39 echoscip-shell system . . echo. -n "Stopping $DESC: $NAME "
40 start-stop-daemonscip-shell system . . start-stop-daemon. --stop --quiet --pidfile /var/run/$NAME.pid \
41 --oknodo \
42 --exec $DAEMON
43 echoscip-shell system . . echo. "."
44 ;;
45 restart|force-reload)
46 #
47 # If the "reload" option is implemented, move the "force-reload"
48 # option to the "reload" entry above. If not, "force-reload" is
49 # just the same as "restart".
50 #
51 echoscip-shell system . . echo. -n "Restarting $DESC: $NAME"
52 start-stop-daemonscip-shell system . . start-stop-daemon. --stop --quiet --pidfile /var/run/$NAME.pid \
53 --oknodo \
54 --exec $DAEMON
55 sleepscip-shell system . . sleep. 1
56 start-stop-daemonscip-shell system . . start-stop-daemon. --start --quiet --pidfile /var/run/$NAME.pid \
57 --chuid distccd \
58 --exec $DAEMON -- $DAEMON_ARGS
59 echoscip-shell system . . echo. "."
60 ;;
61 *)
62 N=/etc/init.d/$NAME
63 echoscip-shell system . . echo. "Usage: $N {start|stop|restart|force-reload}" >&2
64 exit 1
65 ;;
66 esac
67
68 exit 0
69
70