From 6258b32d7ccc40e5de1e7dcd6cdd8db34cca55ca Mon Sep 17 00:00:00 2001 From: Russell Senior Date: Thu, 17 Sep 2020 21:35:18 -0700 Subject: atftp: add init script and config file Signed-off-by: Russell Senior --- net/atftp/files/atftpd.conf | 3 +++ net/atftp/files/atftpd.init | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 net/atftp/files/atftpd.conf create mode 100755 net/atftp/files/atftpd.init (limited to 'net/atftp/files') diff --git a/net/atftp/files/atftpd.conf b/net/atftp/files/atftpd.conf new file mode 100644 index 000000000..6bd66e94c --- /dev/null +++ b/net/atftp/files/atftpd.conf @@ -0,0 +1,3 @@ + +config service 'service' + option path '/srv/tftp' diff --git a/net/atftp/files/atftpd.init b/net/atftp/files/atftpd.init new file mode 100755 index 000000000..83573f998 --- /dev/null +++ b/net/atftp/files/atftpd.init @@ -0,0 +1,17 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2020 OpenWrt.org + +START=95 +PIDFILE=/tmp/run/atftpd.pid + +start() { + config_load atftpd + config_get SRV service path "/srv/tftp" + config_get PORT service port 69 + + atftpd --pidfile $PIDFILE --user root.root --port $PORT --daemon $SRV +} + +stop() { + kill $(cat $PIDFILE) +} -- cgit v1.2.3