Apache: Check kalau apache mati & restart automatis

From OnnoWiki
Jump to navigation Jump to search

Script


#!/bin/bash
if [ `pgrep apache2 -c` -le "0" ]; then
/etc/init.d/apache2 restart
fi


Masukan ke crontab

*/5 * * * * /usr/local/bin/check-apache2.sh