File: debian.init

package info (click to toggle)
anubis 4.1%2Bdfsg1-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,908 kB
  • ctags: 2,607
  • sloc: ansic: 17,022; sh: 4,795; yacc: 1,432; exp: 912; lisp: 697; lex: 415; makefile: 350; perl: 118; awk: 62; sed: 16
file content (40 lines) | stat: -rwxr-xr-x 838 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
#
# DEBIAN:
# To start GNU Anubis as a system service, copy this file to
# `/etc/init.d/anubis' and run the "update-rc.d anubis defaults".
# To remove the service, delete the `/etc/init.d/anubis' file,
# and run the "update-rc.d anubis remove".
#

PROGRAM="anubis"

case "$1" in
  start)
	echo -n $"Starting $PROGRAM: "
	if start-stop-daemon --start --quiet --exec $PROGRAM
	then
	 echo "succeeded."
	else
	 echo "anubis already running."
	fi
	;;
  stop)
	echo -n $"Stopping $PROGRAM: "
	start-stop-daemon --stop --quiet --exec $PROGRAM
	echo "succeeded."
	;;
  force-reload|restart)
	echo -n $"Restarting $PROGRAM: "
	start-stop-daemon --stop --quiet --exec $PROGRAM
	start-stop-daemon --start --quiet --exec $PROGRAM
	echo "succeeded."
	;;
  *)
	echo "Usage: /etc/init.d/anubis {start|stop|restart}"
	exit 1
	;;
esac

exit 0