Skip to content

Instantly share code, notes, and snippets.

View totanus's full-sized avatar

Matteo Balocco totanus

View GitHub Profile
Guest_Test
)Z(ep2X1*!HzH(9Dui8e30@C
@totanus
totanus / website-monitor.sh
Last active November 9, 2018 07:31
This script checks if a website is up/down.
#!/bin/bash
################################################################################
# This script checks if a website is up/down.
# If the website is DOWN the script:
# 1. will send an email to the admin
# 2. will try to restart Apache
#
# It can be added to crontab and it needs a public key authentication with SSH access.