summaryrefslogtreecommitdiff
path: root/notifynewip.sh
blob: 9c08a4028832f6b94bee54a15170270e6e0443b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /bin/bash -

#  SJP 6 Sept 2014
# send an email telling me that the IP address has changed
# called from monitor.sh

cd ~/mail/monitor

cat <<- EOF > emailbody.txt
	Notification of changed IP address
	==================================

	Old IP and date of recording:
	$(cat data/tmp.*)

	New IP:  $ip
	Date  :  $dt
	users :  $(w)
EOF


cat emailbody.txt | mail -A cumquat -s "Cumquat: IP has changed" $EMAILST33V
rm emailbody.txt