Debianization.
[become] / debian / become.init
CommitLineData
b0f66028 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
13PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
14DAEMON=/usr/bin/become
15NAME=become
16DESC="Become authentication server"
17
18test -x $DAEMON || exit 0
19START=false
20test -f /etc/default/$NAME && . /etc/default/$NAME
21if test "$START" != true; then
22 echo "Not starting $DESC -- disabled in /etc/default/$NAME."
23 exit 0
24fi
25
26set -e
27
28case "$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 ;;
61esac
62
63exit 0