3 ms·
It's pretty easy, you can add stuff to a 'local' script that runs last, or just create a new service and rc-update add new-service to start it on boot.
by kennysoona 2y ago
It's pretty easy, you can add stuff to a 'local' script that runs last, or just create a new service and rc-update add new-service to start it on boot.
- robertlagrant 2y agoI'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.
- kennysoona 2y agoIt 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.
- robertlagrant 2y agoSorry - 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.
- kennysoona 2y agoIf 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.