Send email when TCP/IP address changes
Hi everyone, I'm looking a way to intercept the trigger/event when my server's IP address have changed to send me an email informing me that the new IP address is:....
Any suggestions would be appreciated. [solutions with dyndns.org I'm not interesed, I would like something with script,...] |
Here is something I did a while ago. I haven't used it in a while. It looks like you'll have to create a directory called /etc/ipcheck/ . Just put the checkip somewhere and create a cron job to run it however often you want. Then put the mailmessage in the /etc/ipcheck directory you created. Make sure both of the files are executable.
Here is the file checkip Code:
#!/bin/bash Code:
#!/bin/bash |
Thanx mate, you are great! :D
|
No Prob! And I forgot to mention you will need some sort of MTA running (sendmail or the like) and don't forget to replace YOUREMAIL@DOMAIN.TLD with your actual email address.
Good Luck! |
All times are GMT -5. The time now is 02:55 PM. |