[PATCH v3] procd: add procd json output to init

Petr Štetiar ynezz at true.cz
Thu Dec 17 04:56:57 EST 2020


Florian Eckert <fe at dev.tdt.de> [2020-12-17 10:34:25]:

> So that I do not always have to type the whole string.

Well, you don't need to.

root at OpenWrt:/# cat ~/.shinit
procd_service_list() {
        ubus call service list "{'name':\"$1\",'verbose':true}"
}

root at OpenWrt:/# procd_service_list urngd
{
        "urngd": {
                "instances": {
                        "instance1": {
                                "running": true,
                                "pid": 500,
                                "command": [
                                        "/sbin/urngd"
                                ],
                                "term_timeout": 5
                        }
                }
        }
}

Then just put this into your files/root/.shinit file and you've it in all your
images.

> I didn't realize it that way, that only human readable output are allowed.

allowed != expected

Cheers,

Petr



More information about the openwrt-devel mailing list