summaryrefslogtreecommitdiff
blob: b0e950e3e170889574341f7d764543c1c514570e (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2
# $Header: /var/cvsroot/gentoo-x86/net-mail/tpop3d/files/tpop3d-init,v 1.3 2004/07/14 23:52:18 agriffis Exp $

depend() {
	need net
}

checkconfig() {
	if [ ! -e /etc/tpop3d/tpop3d.conf ] ; then
		eerror "You need an /etc/tpop3d/tpop3d.conf file to run tpop3d"
		return 1
	fi
}

start() {
	checkconfig || return 1
	ebegin "Starting tpop3d"
	start-stop-daemon --start --quiet --background \
		--exec /usr/sbin/tpop3d -- -f /etc/tpop3d/tpop3d.conf
	eend $?
}

stop() {
	ebegin "Stopping tpop3d"
	start-stop-daemon --stop --quiet --exec /usr/sbin/tpop3d
	eend $?
}