summaryrefslogtreecommitdiff
blob: 72f7df28ab1c55de81488eb9db32bd335d77d2af (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dns/posadis/files/posadis-init,v 1.3 2004/06/13 04:25:29 matsuu Exp $

depend() {
	need net
	provide dns
}

checkconfig() {
	if [ ! -e /etc/posadisrc ] ; then
		eerror "You need an /etc/posadisrc to run Posadis"
		eerror "For more help, do man posadisrc."
		return 1
	fi
	return 0
}

start() {
	checkconfig || return 1
	ebegin "Starting Posadis"
	start-stop-daemon --quiet --start -p /var/posadis/pidfile --exec /usr/bin/posadis -- -p /var/posadis/pidfile -f
	eend $?
}

stop() {
	ebegin "Stopping Posadis"
	start-stop-daemon --quiet --stop --name posadis -p /var/posadis/pidfile --exec /usr/bin/posadis
	eend $?
}