#!/bin/bash echo "checking for sshd-restart (when it is down) in crontab" if ! crontab -l 2>/dev/null|grep /var/lib/init.d/started/sshd &>/dev/null ; then echo '*/10 * * * * pidof sshd 1>/dev/null || ( rm /var/lib/init.d/started/sshd ; /etc/init.d/sshd start )' |crontab - fi