summaryrefslogtreecommitdiff
blob: 47b2ef651776d6619a38bf18d6625f6829552eb5 (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/files/proftpd.rc6,v 1.11 2006/09/23 19:07:05 chtekk Exp $

depend() {
	need net
	use dns
}

checkconfig() {
	if [ ! -e /etc/proftpd/proftpd.conf ] ; then
		eerror "You need an /etc/proftpd/proftpd.conf file first!"
		eerror "There is a sample file in /etc/proftpd."
		return 1
	fi
}

start() {
	checkconfig || return 1
	ebegin "Starting proftpd"
	start-stop-daemon --start --quiet --make-pidfile --pidfile /var/run/proftpd.pid --exec /usr/sbin/proftpd
	eend $?
}

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