update init script to announce tftp service over mdns
Signed-off-by: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu>
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)
local enable
local srv
local port
+ local mdns
config_load atftpd
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
}