Debian Codegraph @

skeleton

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2 #
3 # skeleton example file to build /etc/init.d/ scripts.
4 # This file should be used to construct scripts for /etc/init.d.
5 #
6 # Written by Miquel van Smoorenburg <[email protected]>.
7 # Modified for Debian GNU/Linux
8 # by Ian Murdock <[email protected]>.
9 #
10 # Version: @(#)skeleton 1.8 03-Mar-1998 [email protected]
11 #
12
13 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`.
14 DAEMON=/usr/sbin/daemonscip-shell filesystem . . `/usr/sbin/daemon`.
15 NAME=daemon
16 DESC="some daemon"
17
18 testscip-shell system . . test. -f $DAEMON || exit 0
19
20 set -e
21
22 case "$1" in
23 start)
24 echoscip-shell system . . echo. -n "Starting $DESC: "
25 start-stop-daemonscip-shell system . . start-stop-daemon. --start --quiet --pidfile /var/run/$NAME.pid \
26 --exec $DAEMON
27 echoscip-shell system . . echo. "$NAME."
28 ;;
29 stop)
30 echoscip-shell system . . echo. -n "Stopping $DESC: "
31 start-stop-daemonscip-shell system . . start-stop-daemon. --stop --quiet --pidfile /var/run/$NAME.pid \
32 --exec $DAEMON
33 echoscip-shell system . . echo. "$NAME."
34 ;;
35 #reload)
36 #
37 # If the daemon can reload its config files on the fly
38 # for example by sending it SIGHUP, do it here.
39 #
40 # If the daemon responds to changes in its config file
41 # directly anyway, make this a do-nothing entry.
42 #
43 # echo "Reloading $DESC configuration files."
44 # start-stop-daemon --stop --signal 1 --quiet --pidfile \
45 # /var/run/$NAME.pid --exec $DAEMON
46 #;;
47 restart|force-reload)
48 #
49 # If the "reload" option is implemented, move the "force-reload"
50 # option to the "reload" entry above. If not, "force-reload" is
51 # just the same as "restart".
52 #
53 echoscip-shell system . . echo. -n "Restarting $DESC: "
54 start-stoscip-shell system . . start-stop-daemon.p-daemonscip-shell system . . start-stop-daemon. --stop --quiet --pidfile \
55 /var/run/$NAME.pid --exec $DAEMON
56 sleepscip-shell system . . sleep. 1
57 start-stoscip-shell system . . start-stop-daemon.p-daemonscip-shell system . . start-stop-daemon. --start --quiet --pidfile \
58 /var/run/$NAME.pid --exec $DAEMON
59 echoscip-shell system . . echo. "$NAME."
60 ;;
61 *)
62 N=/etc/init.d/$NAME
63 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
64 echoscip-shell system . . echo. "Usage: $N {start|stop|restart|force-reload}" >&2
65 exit 1
66 ;;
67 esac
68
69 exit 0