summaryrefslogtreecommitdiffstats
path: root/testing/wzdftpd/wzdftpd-svn.initd
blob: 4dc8d5098e3d64534a46d4c023dcec0778064ecb (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

depend() {
	need net
	use dns
}

checkconfig() {
	if [ ! -f /etc/wzdftpd/wzd.cfg ] ; then
		eerror "No /etc/wzdftpd/wzd.cnf file exists!"
		return 1
	fi
	if [ ! -d /var/run/wzdftpd ] ; then
		install -dD -o ftp -g ftp /var/run/wzdftpd
	fi
}

start() {
	checkconfig || return 1
	ebegin "Starting wzdftpd"
	/usr/sbin/wzdftpd >/dev/null 2>&1 &
	eend $?
}

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