I want to keep a short "last ran status" in ubus for my PROCD service.
Is it possible?
Are there services doing that which code I could peruse?
I want to keep a short "last ran status" in ubus for my PROCD service.
Is it possible?
Are there services doing that which code I could peruse?
Anyone?
Basically upon successful (or unsuccessful) run, I want to store a string of the "last ran status" (within ubus?) so that on the next run attempt I could retrieve it.
I may not be using the correct terms, but I hope the gist of what I'm trying to do is understandable.
Until this commit (https://github.com/openwrt/packages/commit/45af003ba138b55834c44e3ae8638bb2c4725ae7) I've "misused" procd/adblock like you've mentioned. Since that I save all relevant runtime information in a simple json file.
Thanks for your prompt reply Dirk. Why is it a bad idea to store it in ubus?
The idea is quite OK (from my limited perspective), but I've never found a reliable way to update the data section without destroying the dependent trigger information.
Thank you for your comment, based on it I ended up pushing/pulling data from a special status
instance: https://github.com/stangri/openwrt_packages/blob/master/simple-adblock/files/simple-adblock.init#L130-L143
@jow -- any way I can get rid of the:
13:44:16 procd: Not starting instance simple-adblock::status, command not set
13:44:16 procd: Not starting instance simple-adblock::instance1, command not set
messages in the system log? I'm using PROCD for features outside of demonization.
I think the only way to get rid of this warning is to provide a dummy command, something like procd_set_param command /bin/true