summaryrefslogtreecommitdiff
blob: 4fc8b14413b4263e2ff672dacb90d52718d0ec91 (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
#!/sbin/runscript

depend() {
	use logger
	need net
}

checkconfig() {
	if [ ! -d ${TFTPD_ROOT} ]
	then
		eerror "You need a tftp root directory"
		return 1
	fi
}

start() {
	checkconfig || return 1
	ebegin "Starting tftpd"
	start-stop-daemon --start --quiet --exec /usr/sbin/in.tftpd \
		-- ${TFTPD_OPTS} ${TFTPD_ROOT}
	eend $?
}

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