From 0463fbae2f98646fc30de12dfa71856d7d2cc9f6 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Sep 11 2013 14:52:21 +0000 Subject: automatically restart sshd.service on-failure with 42s interval --- 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