summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorF3RR3T <github@st33v.com>2014-09-10 10:31:39 +1000
committerF3RR3T <github@st33v.com>2014-09-10 10:31:39 +1000
commitbce4106a91bf7efd1a257f783c7d31ee9ea1efd1 (patch)
treec1c50d57bf682bedaf344662b0674c2eb94d9ef6
parentce4fdc73baecddba53c78593806c687b892f6a0c (diff)
clean up email titles and cat to file
-rwxr-xr-xnotifynewip.sh12
-rwxr-xr-xreboot.sh2
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