ipchange.sh
#!/bin/sh cd /usr/local/bin mkdir -p .ip/ touch .ip/ip.txt touch .ip/1.log touch .ip/email.txt IPADDRESS=$(curl -s http://ipv4.icanhazip.com) OLDIP=`cat .ip/ip.txt` if [ $IPADDRESS == $OLDIP ] then echo "`date -u` not changed" else echo $IPADDRESS > .ip/ip.txt echo "$OLDIP=>$IPADDRESS" >> .ip/
用户评论