From 0463fbae2f98646fc30de12dfa71856d7d2cc9f6 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Wed, 11 Sep 2013 16:38:22 +0200 Subject: [PATCH] automatically restart sshd.service on-failure with 42s interval --- sshd.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sshd.service b/sshd.service index 094eaa0..6348bc1 100644 --- a/sshd.service +++ b/sshd.service @@ -8,6 +8,8 @@ ExecStartPre=/usr/sbin/sshd-keygen ExecStart=/usr/sbin/sshd -D $OPTIONS ExecReload=/bin/kill -HUP $MAINPID KillMode=process +Restart=on-failure +RestartSec=42s [Install] WantedBy=multi-user.target