File: init

package info (click to toggle)
oidentd 2.0.3-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 840 kB
  • ctags: 505
  • sloc: ansic: 5,290; sh: 3,215; yacc: 364; lex: 335; makefile: 101
file content (52 lines) | stat: -rw-r--r-- 1,240 bytes parent folder | download
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
47
48
49
50
51
52
#!/bin/sh
#
# Start/stops the oident daemon.
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin
OIDENTD=/usr/sbin/oidentd

# See if the daemons are there
test -f ${OIDENTD} || exit 0

# oidentd configuration
OIDENT_OPTIONS=""
OIDENT_USER="nobody"
OIDENT_GROUP="nogroup"
test -f /etc/default/oidentd && . /etc/default/oidentd
# remove obsolete options, these have to be moved to oidentd.conf
# run 'oidentdconfig --show' to see how to do that
OIDENT_OPTIONS=`echo "$OIDENT_OPTIONS"|
	sed -e 's/-[isSnNrwW]//g' -e 's/-F/-f/' -e 's/-x/-r/'`

OPTIONS="${OIDENT_OPTIONS} -u ${OIDENT_USER} -g ${OIDENT_GROUP}"

case "$1" in
	start)
		echo -n "Starting ident daemon:"
		echo -n " oidentd"
		start-stop-daemon --start --quiet --exec ${OIDENTD} -- ${OPTIONS}
		echo "."
		;;
	stop)
		echo -n "Stopping ident daemon:"
		echo -n " oidentd"
		start-stop-daemon --stop --quiet --exec ${OIDENTD} -- ${OPTIONS}
		echo "."
		;;
	reload|restart|force-reload)
		echo -n "Restarting ident daemon:"
		echo -n " oidentd"
		start-stop-daemon --stop --quiet --exec ${OIDENTD} -- ${OPTIONS}
		sleep 2
		start-stop-daemon --start --quiet --exec ${OIDENTD} -- ${OPTIONS}
		echo "."
		;;
	*)
		echo "Usage: $0 {start|stop|restart|reload|force-reload}"
		exit 1
		;;
esac

exit 0