the non-daemon being NFTABLES (userland nft) and having put in place a procd init script it works to the extent of nft actions like starting (invoking at boot and from cli) | stopping (cli) | restarting (cli) are working as expected however it seems that
does not work. Having set PROCD_DEBUG=1 and executing ifdown $iface ; ifup $iface makes it apparent that a service restart is not triggered once the $iface is up.
Is it expected that triggers are only working for daemons but not for executables that are not running permanently?
Thanks for the feedback/suggestion, though I am still interested about an answer to the question since the documentation does not state whether procd_add_interface_trigger requires a daemon process running.
How is that supposed to be working/implemented?
Usage: netifd [options]
Options:
-d <mask>: Mask for debug messages
-s <path>: Path to the ubus socket
-p <path>: Path to netifd addons (default: /lib/netifd)
-c <path>: Path to UCI configuration
-h <path>: Path to the hotplug script
-r <path>: Path to resolv.conf
-l <level>: Log output level (default: 2)
-S: Use stderr instead of syslog for log messages
(default: /sbin/hotplug-call)
( personally... i'd be messing with /etc/init.d/firewall or hijacking fw3 via wrapper to implement... two layers for firewall logic is nice to begin with or if necessary but gets painful after a while )
but I do see the complexities with fw3 and there has been lots of talk re: this... i'm sure one of the few caring dev's who put work in here will school us on the intricacies... specifically your question re: nftables and procd service viability/handling... if there is no binary?
There is a binary but just not running permanently. The situation with the fw3 binary appears to be similar since there is "/etc/hotplug.d/iface/20-firewall". Thus it seems prudent to replicate it for the NFT case.
It would be just easier/tidier if procd_add_interface_trigger would also work for binaries that are not running permanently.
not sure that is really necessary, works without quotes in the stop section at least. Nonetheless, implemented that suggestion but that does not change the outcome.