diff options
Diffstat (limited to 'net-ftp/atftp/files/atftp.init')
-rwxr-xr-x | net-ftp/atftp/files/atftp.init | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/net-ftp/atftp/files/atftp.init b/net-ftp/atftp/files/atftp.init new file mode 100755 index 000000000000..4fc8b14413b4 --- /dev/null +++ b/net-ftp/atftp/files/atftp.init @@ -0,0 +1,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 $? +} |