Use case: when my Fritz Box gets a new IP address, it calls a dyndns CGI script on a FreeBSD box, which should result in updating pf to pass this new IP. (similar to this thread: update pf table via web)
Obviously, www:www should not get sudo for updating the firewall.
How would one pass the message from www to root?
I am thinking of mqtt and mosquitto.
Better options? A named pipe? a Unix socket?
I don't like polling à la cron.
If I should go the mqtt way, is there a kind of dispatcher framework at the shell command level? i.e. instead of having n scripts listen on mosquitto_sub, a general dispatcher using some kind of dispatching table. (topic -> command)
openHAB and its MQTT Binding can do that but this would be way overkill.
Cheers,
weberjn
Obviously, www:www should not get sudo for updating the firewall.
How would one pass the message from www to root?
I am thinking of mqtt and mosquitto.
Better options? A named pipe? a Unix socket?
I don't like polling à la cron.
If I should go the mqtt way, is there a kind of dispatcher framework at the shell command level? i.e. instead of having n scripts listen on mosquitto_sub, a general dispatcher using some kind of dispatching table. (topic -> command)
openHAB and its MQTT Binding can do that but this would be way overkill.
Cheers,
weberjn