opsi/net-ftp/opsi-atftp/files/atftp.init

29 lines
437 B
Plaintext
Raw Normal View History

2013-04-17 08:48:39 +02:00
#!/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 $?
}