Comment by robertlagrant
3 months ago
I'm not sure what's involved in the second of those options, but I think the first, if it means creating a shell script of some sort, is why people like systemd. It's config-driven, not script-driven.
Now I'd be up for a better config format, or perhaps other implementations that use the systemd config format, but I think config is a pretty good idea.
It doesn't mean creating a shell-script, when you install a package it comes with an openrc script. rc-update add servicename just adds it to the list of services to start on boot.
I have no problem with config, but openrc is simple and intuitive enough that no config file is needed.
Sorry - I might've miscommunicated. That side of things sounds fine, but it's the creating of the script itself that I think is nicer as configuration.
If you need to create a script, and generally you don't, then you just copy a template that has start, stop and restart functions. Generally it's not more than launching an executable and killing a process or doing both.
It's certainly not more complicated than authoring a unit file.