Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/surajx/ip-change-notifier

This script takes the global IP of BSNL teracom router and checks if it has changed or not, if changed the script sends it to the specified mail ID
https://github.com/surajx/ip-change-notifier

Last synced: 9 days ago
JSON representation

This script takes the global IP of BSNL teracom router and checks if it has changed or not, if changed the script sends it to the specified mail ID

Awesome Lists containing this project

README

        

Introduction
------------
This script takes the global IP of WAN interface in BSNL(India) TERACOM router and checks if it has changed or not. If changed the script sends the new IP addr to a predefined mail ID.

Usage
-----
1.Edit the configuration file script.cfg and provide details pertaining to your router.
2.Provide an entry in /etc/crontab for executing the script every 15 mins. The entry will look like:
*/15 * * * * bash /getIP.sh
Eg: */15 * * * * surajx bash /home/surajx/bin/sendIP/getIP.sh

File List
---------
getIP.sh - scripts file to be called by crontab every 15 min.
script.cfg - config file containting details required for getIP.sh to run.

Generated Files
---------------
telnet.log - o/p obtained from TERACOM router.
prev_ip.ip - stores the current ip.(IMP file, needed for comparison when ip changes)
err.log - Error log generated by script can be found in this file.

Dependencies
------------
telnet - required to connect to your ADSL router
expect - required to query the ADSL kernal to retrieve the IP
mailx - sends out mail to gmail (require configuration of ~/.mailrc and ~/.msmtprc)
msmtp - required for sending mail

Known Issues
------------
When the system is botted up and has still not connected to the access point. This tool will send out an entry string mail.