Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/saphyel/ipteller

[Legacy] Sends an email when your IP address changes
https://github.com/saphyel/ipteller

ip-lookup python raspberry-pi

Last synced: about 2 months ago
JSON representation

[Legacy] Sends an email when your IP address changes

Awesome Lists containing this project

README

        

# IP teller

## Intro
This app saves your public IP and send a report when is different.

By default generates a cron job that checks every hour your public IP against the page jsonip if is different will send you an email with the new IP.

## Config
You need to add your gmail details as environment variables using `GMAIL_USER` and `GMAIL_PASS` (check the docker-compose.yml). The account that you specify will be the sender and receiver of the email.

## Dev
Execute: `pip install --user -r dev-requirements.txt`

### Publish your package
Execute: `python setup.py sdist;twine upload dist/*;rm dist/*`

### Run tests
Execute: `behave`

## Cron
Create a file in /etc/profile.d/ipteller.sh with the variables:
```bash
export GMAIL_USER='[email protected]'
export GMAIL_PASS='Password'
export IP_PROVIDER='jsonip'
```

and then in execute `crontab -e` and add this line at the end:
```bash
SHELL=/bin/bash
0 * * * * source /etc/profile.d/ipteller.sh;~/.local/lib/python2.7/site-packages/ipteller/ipteller.py
```