Debianization.
[become] / debian / become.init
diff --git a/debian/become.init b/debian/become.init
new file mode 100755 (executable)
index 0000000..c3170ea
--- /dev/null
@@ -0,0 +1,63 @@
+#! /bin/sh
+#
+# skeleton     example file to build /etc/init.d/ scripts.
+#              This file should be used to construct scripts for /etc/init.d.
+#
+#              Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#              Modified for Debian GNU/Linux
+#              by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+# Version:     @(#)skeleton  1.9.1  08-Apr-2002  miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/become
+NAME=become
+DESC="Become authentication server"
+
+test -x $DAEMON || exit 0
+START=false
+test -f /etc/default/$NAME && . /etc/default/$NAME
+if test "$START" != true; then
+    echo "Not starting $DESC -- disabled in /etc/default/$NAME."
+    exit 0
+fi
+
+set -e
+
+case "$1" in
+  start)
+       echo -n "Starting $DESC: $NAME"
+       start-stop-daemon --start --quiet --pidfile /var/run/become.pid \
+           --exec $DAEMON -- --daemon
+       echo "."
+       ;;
+  stop)
+       echo -n "Stopping $DESC: $NAME"
+       start-stop-daemon --stop --oknodo --quiet \
+           --pidfile /var/run/become.pid --exec $DAEMON
+       echo "."
+       ;;
+  reload|force-reload)
+       echo -n "Reloading $DESC configuration..."
+       start-stop-daemon --stop --signal 1 --quiet --pidfile \
+               /var/run/become.pid --exec $DAEMON
+       echo "done."
+       ;;
+  restart)
+       echo -n "Restarting $DESC: $NAME"
+       start-stop-daemon --stop --quiet --pidfile \
+               /var/run/become.pid --exec $DAEMON
+       sleep 1
+       start-stop-daemon --start --quiet --pidfile \
+               /var/run/become.pid --exec $DAEMON -- --daemon
+       echo "."
+       ;;
+  *)
+       N=/etc/init.d/$NAME
+       echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+       exit 1
+       ;;
+esac
+
+exit 0