File: squidtaild.init

package info (click to toggle)
squidtaild 2.1a6-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 256 kB
  • sloc: perl: 1,054; makefile: 376; sh: 51
file content (46 lines) | stat: -rw-r--r-- 845 bytes parent folder | download | duplicates (6)
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
41
42
43
44
45
46
#! /bin/sh
### BEGIN INIT INFO
# Provides:          squidtaild
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
### END INIT INFO
#
# Written by: Behan Webster <behanw@pobox.com>
#

NAME=squidtaild
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/squidtaild
PID=/var/run/squidtaild.pid

trap "" 1

test -f $DAEMON || exit 0

# See how we were called.
case "$1" in
  start)
	printf "Starting $NAME: $NAME"
	start-stop-daemon --start --background --quiet --exec $DAEMON
	echo "."
	;;
  stop)
	printf "Stopping $NAME: $NAME"
	start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/squidtaild.pid
	rm -f $PID
	echo "."
	;;
  restart | force-reload)
	$0 stop
	sleep 1
	$0 start
	;;
  *)
	echo "Usage: $NAME {start|stop|restart}"
	exit 1
	;;
esac

exit 0