|
|
|
|
|
by cyberax
21 days ago
|
|
By not using systemd, you just shift the complexity around. Now suddenly every program needs to be able to do the double-forking song-and-dance, track PID files, etc. systemd suffers from the lack of systemic design, but it's still way better than the pile of scripts that it replaced. |
|
https://github.com/openbsd/src/blob/master/usr.sbin/rcctl/rc...
Then you got the initialization script
https://github.com/openbsd/src/blob/master/etc/rc
Service file can be very small
https://github.com/openbsd/src/blob/master/etc/rc.d/httpd
Powered by
https://github.com/openbsd/src/blob/master/etc/rc.d/rc.subr
Also daemon(3) for running as a system service
https://man.openbsd.org/daemon.3
And no need to track pid. It uses pgrep with the flags and the program name by default. I believe OpenRC does the same.
https://github.com/openbsd/src/blob/f5d74fd467fccdfc60b450a7...