|
Has anyone had positive experiences with systemd? Success stories because of feature x? I've pretty grim personal opinion of it, based on similiar experiences as this story. I'd rather just use a simpler approach (another init) that _works_, and doesnt involve hours of debugging. I've never had any troubles with sysv-style init for example. |
I used to run my home automation stuff (Home Assistant, Node-RED, and a custom shim between my power meter interface and MQTT) in a FreeBSD Jail and recently switched to a Debian VM.
Getting everything to start properly with FreeBSD's rc scripts was a minor nightmare. It took a lot of work to accomplish the task of "Run command x, which doesn't daemonize, as user y in directory z and redirect stdout and stderr to blah.log". For quite a while, I was just running things by hand under tmux because I couldn't figure out the exact method to make it work properly.
In comparison, doing the same in systemd was incredibly easy. This type of service is really easy to set up in a systemd unit file.
I'll admit that a lot of the problems with doing this in FreeBSD were likely my own lack of skill and/or understanding. Systemd doesn't require this level of skill/understanding to set up a simple service though.
In terms of benefits of systemd, the best one for me is logging. Having stdout/stderr from these processes go to the journal automatically is quite nice and querying it with journalctl is easy now that I've figured out how to use it.
When developing simple services (like the custom shim mentioned earlier), systemd greatly simplifies things since I don't need to worry about daemonizing, switching users, logging, etc.