summaryrefslogtreecommitdiff
blob: 07a2a85ab0142e9bc5a4a75d5d8a9992d02f73d0 (plain)
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
#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/xinetd/files/xinetd.rc6,v 1.23 2009/10/11 00:45:08 vapier Exp $

opts="reload dump check"

depend() {
	use net
}

start() {
	ebegin "Starting xinetd"
	start-stop-daemon --start --exec /usr/sbin/xinetd -- \
		-pidfile /var/run/xinetd.pid ${XINETD_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping xinetd"
	start-stop-daemon --stop --quiet --pidfile /var/run/xinetd.pid
	eend $?
}

do_sig() {
	local sig=$1 ; shift
	ebegin "$*"
	start-stop-daemon --oknodo --stop --signal ${sig} --pidfile /var/run/xinetd.pid
	eend $?
}
reload() { do_sig HUP  "Reloading configuration" ; }
dump()   { do_sig USR1 "Dumping configuration" ; }
check()  { do_sig IOT  "Performing Consistency Check" ; }