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".
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: https://github.com/hauleth/erlang-systemd/blob/0ce748edffcb72bb028733e9ca4707cb30add853/src/systemd_protocol.erl#L37-L41
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 thisstring:is_empty()
out, the status is correctly cleared according to "systemctl status $service".Is it invalid to send empty values to systemd?