From bce4106a91bf7efd1a257f783c7d31ee9ea1efd1 Mon Sep 17 00:00:00 2001 From: F3RR3T Date: Wed, 10 Sep 2014 10:31:39 +1000 Subject: clean up email titles and cat to file --- notifynewip.sh | 12 +++--------- reboot.sh | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/notifynewip.sh b/notifynewip.sh index bc4ca60..9c08a40 100755 --- a/notifynewip.sh +++ b/notifynewip.sh @@ -10,22 +10,16 @@ cat <<- EOF > emailbody.txt Notification of changed IP address ================================== - The IP address of cumquat has changed. - Old IP and date of recording: -EOF - -cat data/tmp.* >> emailbody.txt + $(cat data/tmp.*) -cat <<- EOF >> emailbody.txt New IP: $ip Date : $dt - + users : $(w) EOF -uptime >> emailbody.txt -cat emailbody.txt | mail -A cumquat -s "IP has changed" $EMAILST33V +cat emailbody.txt | mail -A cumquat -s "Cumquat: IP has changed" $EMAILST33V rm emailbody.txt diff --git a/reboot.sh b/reboot.sh index 19c9391..3abd0e3 100755 --- a/reboot.sh +++ b/reboot.sh @@ -31,6 +31,6 @@ cat <<- EOF > data/emailbody.txt EOF sleep 180 # wait 3 mins to make sure have network -cat data/emailbody.txt | mail -A cumquat -s "Cumquat reboot notification" $EMAILST33V +cat data/emailbody.txt | mail -A cumquat -s "Cumquat: reboot notification" $EMAILST33V rm data/emailbody.txt rm data/heartlock -- cgit v1.3