Hello
I have a very simple procd init script as follows
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=99
start_service() {
procd_open_instance
procd_set_param command /usr/bin/abnet
procd_set_param respawn
procd_close_instance
}
service_triggers() {
procd_add_interface_trigger "interface.up" br-lan /etc/init.d/abnet restart
}
basically it starts a program under /usr/bin and I want it to be restarted every time when br-lan interface gets up which may indicate some network changes.
I have tried to use
procd_add_interface_trigger "interface.up" br-lan
procd_add_interface_trigger "interface..up" br-lan
procd_add_interface_trigger "interface." br-lan
and also put double quotation marks around "br-lan" and all combinations
but no matter how I play with
ifconfig br-lan down/up
I don't see the service is getting restarted
(this can be simply verified by checking the process id with top)
I have checked all relevant openwrt developer guide pages and some other online discussions but couldn't get a solution.
Hope someone can give me a hand on this.
Thanks in advance