ubus running key status

Ravi Paluri (QUIC) quic_rpaluri at quicinc.com
Fri Feb 23 04:43:02 PST 2024


Hi OpenWRT team,
    We are working on ubus and running a script using ubus_invoke API.
We observed that when the script gets scheduled for execution and then later once it completes execution, the "running" key value (see below command o/p) is changing to "false" from "true".

ubus call service list '{"name":"servicemanager.init","verbose":"True"}'
{
        "servicemanager.init": {
                "instances": {
                        "instance1": {
                                "running": true,
                                "pid": 3690,
                                "command": [
                                        "/usr/bin/servicemanager"
                                ],                }
        }
}

Can you let us know, is there a way to get a notification when the "running" key value moves to "false" from "true"?
OR is there any ubus API to which we can register a callback, which will then be invoked when the execution is complete?

Thanks,
Ravi



More information about the openwrt-devel mailing list