3 ms·
> This is OpenBSD's sshd init script: It's highly abstracted with macros, but that's not the same as declarative. It's still using full shell evaluation and an
by viraptor 6y ago
> This is OpenBSD's sshd init script:
It's highly abstracted with macros, but that's not the same as declarative. It's still using full shell evaluation and any service can complicate it or make it slightly different. It's pretty close though.
> I see that the equivalent of the rc_reload function is "ExecReload=/bin/kill -HUP $MAINPID" (which is actually less safe...)
> man: "rc_reload - Send a SIGHUP signal using pkill(1) on the regular expression given in the pexp variable."
I don't understand why it would be less safe. $MAINPID is well defined because systemd knows the top process in that service's group. A pkill/regex by definition matches by text, so it can HUP any process with matching name - whether it was started by this service or not.
> I mean is anyone CURRENTLY using them?
Not that I'm aware of. They're still installed for people who don't have a different supported init system, but that's just edge cases these days.
- Arch-TK 6y agoIt's less safe because it reloads sshd regardless of if the reload would cause sshd to fail to reload. It runs a config check of sshd before it goes ahead and asks sshd to reload its config.