[PATCH 0/5] ubus: extend the service object with a restart method
Florian Eckert
fe at dev.tdt.de
Wed Dec 2 09:52:28 EST 2020
This patchset adds the new method "restart" to the ubus service object.
This method is called on a service restart, if it is managed by procd.
I have noticed that during a firewall restart the mwan3 rules have all
disappeared and I have to restart my service as well. I did not expected
this. So that I don't have to do this extra step, an event should be
generated during a service restart.
All services that want to react to this event can create a
callback script. The same applies to a config change.
As an example I used the firewall here, because I came across the
problem here.
Full discussion hat taken place at this URL:
https://github.com/openwrt/packages/pull/13931
Florian Eckert (5):
procd: add restart ubus call
base-files: add restart function wrapper
firewall: fix whitespace
firewall: use new restart_service callback
procd: add api wrapper
package/base-files/files/etc/rc.common | 13 ++++
.../config/firewall/files/firewall.init | 4 +-
package/system/procd/files/procd.sh | 23 +++++++
.../patches/0010-add-restart-event.patch | 64 +++++++++++++++++++
4 files changed, 102 insertions(+), 2 deletions(-)
create mode 100644 package/system/procd/patches/0010-add-restart-event.patch
--
2.20.1
More information about the openwrt-devel
mailing list