4 ms·
Yea, woe is me - having to be aware of an init system. If you want users, you'll cater to them. Distribution maintainers do. Here's the Unit, what this provide
by bravetraveler 3y ago
Yea, woe is me - having to be aware of an init system. If you want users, you'll cater to them. Distribution maintainers do.
Here's the Unit, what this provides:
[Unit]
Description=Whatever
After=network.target network-online.target
[Service]
Type=forking
ExecStart=/etc/init.d/your_awesome_initscript start
ExecStop=/etc/init.d/your_awesome_initscript stop
ExecReload=/etc/init.d/your_awesome_initscript restart
[Install]
WantedBy=some.target
For bonus points - and smaller repositories and more reliability...
... one could skip the init script, offloading whatever nonsense it does to the DSL of systemd.
It takes hardly any effort, searching for obvious keywords with 'man systemd.{unit,service,exec}' at your disposal. A likely one is 'Environment' for, well, environment variables.
Save yourself dozens of lines of code and support it. It's noble to work without, but why deliberately limit yourself beyond making an unheard statement?
It's not removed yet, there's time.