File: timeoutd.init.d

package info (click to toggle)
timeoutd 1.5-10
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 128 kB
  • ctags: 100
  • sloc: ansic: 1,376; makefile: 39; sh: 35
file content (44 lines) | stat: -rw-r--r-- 934 bytes parent folder | download | duplicates (4)
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
#! /bin/sh
# /etc/init.d/timeoutd: start and stop the user timeout daemon.
#
# Based on skeleton 1.9.1 by Miquel van Smoorenburg <miquels@cistron.nl>.

DAEMON=/usr/sbin/timeoutd
NAME=timeoutd
DESC="user timeout daemon"

test -x $DAEMON || exit 0

set -e

case "$1" in
  start)
	echo -n "Starting $DESC: $NAME"
	start-stop-daemon --start --oknodo --quiet --exec $DAEMON
	echo "."
	;;
  stop)
	echo -n "Stopping $DESC: $NAME"
	start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
	echo "."
	;;
  reload|force-reload)
	echo -n "Reloading $DESC configuration..."
	start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
	echo "done."
  	;;
  restart)
	echo -n "Restarting $DESC: $NAME"
	start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
	sleep 1
	start-stop-daemon --start --quiet --exec $DAEMON
	echo "."
	;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
	exit 1
	;;
esac

exit 0