e.g., by watching /proc
or
netstat -lntu
or
http://wiki.openwrt.org/doc/techref/ubus or hotplug or procd_add_mdns_service` <-- OpenWrt; sounds interesting; undocumented?
The dropbear init script of a forked OpenWrt was extended by
[ "${mdns}" -ne 0 ] && procd_add_mdns "ssh" "tcp" "$Port" "daemon=dropbear"
perhaps this is the route to go? But then all init scripts of services would have to be changed. Where is the documentation for the mdns OpenWrt package?
/etc/services on OpenWrt contains a translation table from ports to services; we could use that too, maybe in conjunction with something like netstat -altuen | grep LISTEN or parsing /proc/net/tcp and /proc/net/udp.
e.g., by watching
/proc
ornetstat -lntu
orhttp://wiki.openwrt.org/doc/techref/ubus or
hotplugor
procd_add_mdns_service` <-- OpenWrt; sounds interesting; undocumented?The dropbear init script of a forked OpenWrt was extended by
[ "${mdns}" -ne 0 ] && procd_add_mdns "ssh" "tcp" "$Port" "daemon=dropbear"
perhaps this is the route to go? But then all init scripts of services would have to be changed. Where is the documentation for the mdns OpenWrt package?/etc/services
on OpenWrt contains a translation table from ports to services; we could use that too, maybe in conjunction with something likenetstat -altuen | grep LISTEN
or parsing/proc/net/tcp
and/proc/net/udp
.Pull requests are welcome.