mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 23:18:42 +01:00
atftp: add init script and config file
Signed-off-by: Russell Senior <russell@personaltelco.net>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
|
||||
config service 'service'
|
||||
option path '/srv/tftp'
|
||||
Executable
+17
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user