Skip to content

Commit

Permalink
atftpd: update init script to publish tftp service
Browse files Browse the repository at this point in the history
update init script to announce tftp service over mdns

Signed-off-by: Mohd Husaam Mehdi <[email protected]>
  • Loading branch information
mhusaam committed Mar 29, 2024
1 parent 49c4564 commit 7592979
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/atftp/files/atftpd.init
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ start_service() {
local enable
local srv
local port
local mdns

config_load atftpd

Expand All @@ -18,9 +19,11 @@ start_service() {

config_get srv service path "/srv/tftp"
config_get port service port 69
config_get mdns service mdns 1

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
}

0 comments on commit 7592979

Please sign in to comment.