You have call the shell script in der /sbin/reload_config
Am 23.09.2015 4:56 vorm. schrieb "Lars Boegild Thomsen" <
[email protected]>:

> Hi Everybody,
>
>
>
> I am struggling a bit with triggering automatic service reload based on
> configuration change.
>
>
>
> Latest trunk and all that jazz. New software package called "mqttbridge"
> which basically is meant to publish ubus method results to mqtt. Init is in
> /etc/init.d/mqttbridge, config in /etc/config/mqttbridge.
>
>
>
> In the "olden days" this was all defined in /etc/config/ucitrack -
> something along this line:
>
>
>
> config mqttbridge
>
> option init mqttbridge
>
>
>
> However, according to this:
>
>
>
>
> http://wiki.openwrt.org/inbox/procd-init-scripts#procd_triggers_on_config_filenetwork_interface_changes
>
>
>
> It would appear that ucitrack is no longer used? I have also tried the
> service_triggers in the init script:
>
>
>
> root@pm2:/etc/config# cat /etc/init.d/mqttbridge
>
> #!/bin/sh /etc/rc.common
>
>
>
> START=90
>
>
>
> USE_PROCD=1
>
> NAME=mqttbridge
>
> PROG=/usr/sbin/mqttbridge
>
>
>
> start_service()
>
> {
>
> procd_open_instance
>
> procd_set_param respawn
>
> procd_set_param command "$PROG"
>
> procd_close_instance
>
> }
>
>
>
> service_triggers()
>
> {
>
> procd_add_reload_trigger "mqttbridge"
>
> }
>
>
>
> The thing is - neither approach (or rather both of them) works. Manual
> "/etc/init.d/mqttbridge" restart works fine, but automatic reload is never
> triggered on configuration change.
>
>
>
> What did I miss and what is the correct approach.
>
>
>
> --
>
> Lars Bøgild Thomsen
>
> Public Key: http://bright-things.com/lars-bogild-thomsen/
>
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to