aboutsummaryrefslogtreecommitdiff
path: root/net/atftp/files
diff options
context:
space:
mode:
authorRussell Senior <russell@personaltelco.net>2020-09-17 21:35:18 -0700
committerRussell Senior <russell@personaltelco.net>2020-09-18 10:22:56 -0700
commit6258b32d7ccc40e5de1e7dcd6cdd8db34cca55ca (patch)
treed669149a18d90a980375fcc7db6d4a0dbb72e308 /net/atftp/files
parent64cf9fb779b052efb97b901d76ea818989638283 (diff)
atftp: add init script and config file
Signed-off-by: Russell Senior <russell@personaltelco.net>
Diffstat (limited to 'net/atftp/files')
-rw-r--r--net/atftp/files/atftpd.conf3
-rwxr-xr-xnet/atftp/files/atftpd.init17
2 files changed, 20 insertions, 0 deletions
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)
+}