diff options
| author | F3RR3T <github@st33v.com> | 2014-09-10 10:31:39 +1000 |
|---|---|---|
| committer | F3RR3T <github@st33v.com> | 2014-09-10 10:31:39 +1000 |
| commit | bce4106a91bf7efd1a257f783c7d31ee9ea1efd1 (patch) | |
| tree | c1c50d57bf682bedaf344662b0674c2eb94d9ef6 | |
| parent | ce4fdc73baecddba53c78593806c687b892f6a0c (diff) | |
clean up email titles and cat to file
| -rwxr-xr-x | notifynewip.sh | 12 | ||||
| -rwxr-xr-x | 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 @@ -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 |
