Simple bash script to check current ip and email new ip if changed
Hello all,
I've been creating various scripts to hone my scripting skills so I thought I'd share this here. It's just a simple bash script to check current ip address and, if it has changed, email the new current ip to specified address. You may need to create a couple empty files if they don't yet exist. (e.g. currentip.txt and oldip.txt) I may add in a test to check for existence and create if necessary at a later date. Note that you will need to change /PATH/TO/SCRIPT to the proper location Code:
#!/bin/bash |
All times are GMT -5. The time now is 04:51 PM. |