Quantcast
Channel: Tutorials — LowEndTalk
Viewing all articles
Browse latest Browse all 367

Script to send an email if your server is down

$
0
0

Hello, I made a script that emails me if my backup server is off, and then email me if it gets back on. It is pretty simple BUT this is an ALPHA RELEASE !

REQUIREMENTS: Linux PHP with PEAR (and PEAR needs mail, net_smtp) A SMTP server Backup VPS (like 10 a year ones)

Main script (put it on the server you DONT WANT TO check if it is down): http://paste2.org/p/1770117 The mandaemail.php script: http://paste2.org/p/1770124

Then, just make chmod a+x on the main script and add it to your cron to run the script every minute.

EDIT: Poject's here, with Wiki! http://code.google.com/p/vps-email-status/


Viewing all articles
Browse latest Browse all 367

Trending Articles