Save and Apply hooks on_after_commit won't restart service after writing changes to config file

I am trying to use any of the save and apply hooks for Luci but it looks like the service is getting restarted before the changes are written to the config file.

function s.on_after_commit(self)
        luci.sys.call("/etc/init.d/ser2net restart >/dev/null 2>&1")
end

but nothing seems todo the trick
anyone got any ideas?
also tried function m and map and replaced self with map etc etc

Any ideas would be welcome

If /etc/init.d/ser2net is procd enabled, you don't need to do any of this. Service restart will happen automatically upon commit.

Hey Jow,

Thanks for your quick reply, i'm using the ser2net from the official feed and it does seem tobe procd enabled. i allready looked into this but i'm not quite sure what would be the best approach for this.
i Found that calling for procd_add_reload_trigger should do the trick but can't seem to figur out how to implement it into the current feed so changes won't be overwritten. and i think best way to go here is asking for a change threw github?

Any ideas on this?

I found the solution and it works flawless. just had to add the below code to the ser2net.init file in the feed.
adding the below code to the end of the file works.

service_triggers () {
  procd_open_trigger
    procd_add_reload_trigger "ser2net"
    procd_add_config_trigger "config.change" "ser2net" /etc/init.d/ser2net restart
    procd_add_config_trigger "config.change" "/etc/config/ser2net" /etc/init.d/ser2net restart
  procd_close_trigger
}