A terrible yet conveniently easy way of tracking the dynamic public IP of my home server.
- Create a repository somewhere private and clone locally
- The remote name must be
origin
(default value).
- The remote name must be
- Add this repository as submodule
git submodule add git@github.com:tihbe/MyShittyDNS.git
- Install python dependencies
pip3 install -r ./MyShittyDNS/requirements.txt
- Execute the script
python3 ./MyShittyDNS/fetchip.py
- You should have your public IP address in your private git repository.
- Cronjob the python script
echo "*/5 * * * * $USER $(which python) $(pwd)/MyShittyDNS/fetchip.py >> $(pwd)/cron.log 2>&1" | sudo tee /etc/cron.d/myshittydns