I'm working on LuCI interface for my portproxy tool. I'm keeping the whole configuration in /etc/config/softwire. I've developed LuCI module that allows easy edition of that file.
Edition and saving works ok. The only thing I can't find is how to restart service after user click "save&apply.". As I understand, LuCI will then call uci commit.
But how do I force uci (or LuCI) to execute something like "/etc/init.d/portproxy restart"?
There' s a good example of what I'am trying to accomplish: port forwarding configuration. Once you modify something and commit the changes, LuCI web is reloaed and "Applying changes" table appears with information regarding firewall and qos restarting. I believe something like:
/etc/init.d/firefwall restart
/etc/init.d/qos restart
But how do I make my package to restart once I commit changes to my own configuration?
Any tips and pointers to the already existing solutions are more than welcome.
Tomek