Voici un cht’i script bash a executer en cron. Trois exemple pour squid, qmail et le pop3(qmail)
#!/bin/sh
ps -ef | grep squid | grep -v grep
[ $? -ne 0 ] && {
/etc/init.d/squid restart
sleep 30
}
ps -ef | grep qmail | grep -v grep
[ $? -ne 0 ] && {
/etc/init.d/qmail restart
sleep 30
}
ps -ef | grep pop3d | grep -v grep
[ $? -ne 0 ] && {
/etc/init.d/qmail restart
sleep 30
}