bash script detect if ip address is correct
I'm not very good at bash scripts and I have searched google but can't find a script example that suits my needs.
I run a linux server and I test my WAN address with curl ifconfig.me.
if the system is working correctly it gives me ip address (example) 11.22.33.44.
but if its not working it gives me address (example) 99.88.77.66.
I'm looking for a script that will run curl ifconfig.me and if it returns 11.22.33.44 it will no nothing and if it returns 99.88.77.66 it will execute a command.
thanks for any pointers
|