How to clear service status / send empty values?
dumbbell opened this issue · 1 comments
dumbbell commented
This is more a question than an issue at this stage.
Here, when a line is encoded before it is sent to systemd, variables with no data are dropped:
erlang-systemd/src/systemd_protocol.erl
Lines 37 to 41 in 0ce748e
The only way I found so far to clear the status of a service (using systemd:notify({status, Status})
) is to set it to an empty string. Unfortunately, out-of-the-box, the value is dropped during encode. If I comment this string:is_empty()
out, the status is correctly cleared according to "systemctl status $service".
Is it invalid to send empty values to systemd?
hauleth commented
I do not remember why I have done that. Send PR that removes this check and we will be ok.