@jow -- as some users pointed out, my old way of setting PROCD with ubus from CLI stopped working on recent snapshots:
if I do: ubus call service set "{ \"name\": \"${packageName}\", \"instances\": { \"status\": { \"command\": [ \"/bin/true\" ], \"data\": { \"status\": \"${2}\" }}}}" for some reason it gets deleted when my PROCD-enabled init script terminates.
Adding it manually from CLI after the init script terminated works, so I've resorted to ( sleep 1 && ubus call service set "{ \"name\": \"${packageName}\", \"instances\": { \"status\": { \"command\": [ \"/bin/true\" ], \"data\": { \"status\": \"${2}\" }}}}" | cat & ).
That seems to work, but it's a hack and I'd like to fix the underlying issue. Is it a ubus issue in snapshots or should I modify my code?
IMHO you shouldn't (mis-)use the procd service object for persistent runtime information in your app - as an alternative approach save all required information directly in a JSON file on tmpfs.
"Wasteful" in what way? Both methods consume a minimal amount of memory. The json implementation in scripts is pretty straight forward, json parsing in LuCI is quite simple as well ... and you are much more flexible in storing any kind of app-related information.