#!/bin/bash

function exip() { lynx --dump http://ipecho.net/plain; }

prev_ip=0

if [ -z ip_addr ]; then
    prev_ip=`cat ip_addr`
else
    echo "0.0.0.0" > ip_addr
fi

curr_ip=`exip`

#echo $prev_ip
#echo $curr_ip

if [ $prev_ip!=$curr_ip ]; then
    mail -s "New IP: $curr_ip" user1@xxx.com user2@xxx.com < ip_addr
    echo $curr_ip > ip_addr
fi


#!/bin/bash

function exip() { lynx --dump http://ipecho.net/plain; }

prev_ip=0

if [ -z ip_addr ]; then
    prev_ip=`cat ip_addr`
else
    echo "0.0.0.0" > ip_addr
fi

curr_ip=`exip`

#echo $prev_ip
#echo $curr_ip

if [ $prev_ip!=$curr_ip ]; then
    mail -s "New IP: $curr_ip" user1@xxx.com user2@xxx.com < ip_addr
    echo $curr_ip > ip_addr
fi


Convert file format - mac2unix
Convert file format - mac2unix

Signed-off-by: Robbie Cao <643a933cab46d49aae0d64e790867eaec8b68831@gmail.com>
