openssh: add respawn and reloading via signal
authorErik Karlsson <erik.karlsson@genexis.eu>
Wed, 12 Apr 2023 16:09:07 +0000 (18:09 +0200)
committerRosen Penev <rosenp@gmail.com>
Mon, 1 May 2023 10:34:10 +0000 (13:34 +0300)
Configure the openssh server to respawn. Reload by sending SIGHUP

Signed-off-by: Erik Karlsson <erik.karlsson@genexis.eu>
net/openssh/files/sshd.init

index e7735364dc8a7e145b9a2d9fe0f32b89b686b449..0b859e146e03e492786dd1b3c8baaf90422af742 100644 (file)
@@ -27,9 +27,14 @@ start_service() {
        procd_open_instance
        procd_add_mdns "ssh" "tcp" "$lport"
        procd_set_param command $PROG -D
+       procd_set_param respawn
        procd_close_instance
 }
 
+reload_service() {
+       procd_send_signal sshd
+}
+
 shutdown() {
        local pid