Debianization.
[become] / debian / become.init
1 #! /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 <miquels@cistron.nl>.
7 # Modified for Debian GNU/Linux
8 # by Ian Murdock <imurdock@gnu.ai.mit.edu>.
9 #
10 # Version: @(#)skeleton 1.9.1 08-Apr-2002 miquels@cistron.nl
11 #
12
13 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
14 DAEMON=/usr/bin/become
15 NAME=become
16 DESC="Become authentication server"
17
18 test -x $DAEMON || exit 0
19 START=false
20 test -f /etc/default/$NAME && . /etc/default/$NAME
21 if test "$START" != true; then
22 echo "Not starting $DESC -- disabled in /etc/default/$NAME."
23 exit 0
24 fi
25
26 set -e
27
28 case "$1" in
29 start)
30 echo -n "Starting $DESC: $NAME"
31 start-stop-daemon --start --quiet --pidfile /var/run/become.pid \
32 --exec $DAEMON -- --daemon
33 echo "."
34 ;;
35 stop)
36 echo -n "Stopping $DESC: $NAME"
37 start-stop-daemon --stop --oknodo --quiet \
38 --pidfile /var/run/become.pid --exec $DAEMON
39 echo "."
40 ;;
41 reload|force-reload)
42 echo -n "Reloading $DESC configuration..."
43 start-stop-daemon --stop --signal 1 --quiet --pidfile \
44 /var/run/become.pid --exec $DAEMON
45 echo "done."
46 ;;
47 restart)
48 echo -n "Restarting $DESC: $NAME"
49 start-stop-daemon --stop --quiet --pidfile \
50 /var/run/become.pid --exec $DAEMON
51 sleep 1
52 start-stop-daemon --start --quiet --pidfile \
53 /var/run/become.pid --exec $DAEMON -- --daemon
54 echo "."
55 ;;
56 *)
57 N=/etc/init.d/$NAME
58 echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
59 exit 1
60 ;;
61 esac
62
63 exit 0