Last active
July 13, 2018 00:11
-
-
Save simbalinux/2eeac0fb5ebe908f8d4b145a565778c0 to your computer and use it in GitHub Desktop.
restart_check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#this is a coment for the code | |
set -x | |
sleep 60 | |
IP=$(hostname -i) | |
HOSTNAME=$(hostname -f) | |
echo "$HOSTNAME online. IP address: $IP" > ./email.txt | |
date >> ./email.txt | |
tail ./email.txt | /usr/sbin/sendmail [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment