atftpd: update init script to publish tftp service
update init script to announce tftp service over mdns Signed-off-by: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu>
This commit is contained in:
parent
6afd740a89
commit
4695e2c10f
|
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=atftp
|
||||
PKG_VERSION:=0.8.0
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
|
||||
|
|
|
@ -10,6 +10,7 @@ start_service() {
|
|||
local enable
|
||||
local srv
|
||||
local port
|
||||
local mdns
|
||||
|
||||
config_load atftpd
|
||||
|
||||
|
@ -18,9 +19,11 @@ start_service() {
|
|||
|
||||
config_get srv service path "/srv/tftp"
|
||||
config_get port service port 69
|
||||
config_get mdns service mdns 0
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $BIN "--no-fork" "--daemon" "--user" "root.root" "--port" "$port" "$srv"
|
||||
[ "${mdns}" -ne 0 ] && procd_add_mdns "tftp" "udp" "$port" "daemon=atftpd"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue