summaryrefslogtreecommitdiff
blob: 57e33d68ac94a0c551651390f9d6fbfc6392a678 (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-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/sys-apps/xinetd/files/xinetd.rc6,v 1.9 2001/12/06 20:17:03 azarah Exp $

#you may move this into your rc.conf file if you wish
XINETD_OPTS="-stayalive -reuse"

depend() {
	need net
}

checkconfig() {
	if [ ! -e /etc/xinetd.conf ] ; then
		eerror "You need an /etc/xinetd.conf file to run xinetd"
		eerror "There is a sample file in /usr/share/doc/xinetd"
		return 1
	fi
}

start() {
	checkconfig || return 1
	ebegin "Starting xinetd"
	start-stop-daemon --start --quiet --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 $?
}