Skip to content

small bash-script to refresh your dyn A entry for many providers

Notifications You must be signed in to change notification settings

sedrubal/dyndns-refresh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dyndns-refresh

a small bash-script to refresh a dyn A entry. Should work for many providers.

features

  • simple bash-script (you don't have to install a program)
  • logging (the response of the provider will be logged)

usage

  • clone the repository (for example in your home directory) and make dyndns.sh executeable
git clone https://github.com/sedrubal/dyndns-refresh.git && cd dyndns-refresh
chmod +x dyndns.sh
  • copy the config.cfg.example to config.cfg and edit it. You only have not to provide every variable:
cp config.cfg.example config.cfg
editor config.cfg
# provide following configs:
# - $url
# - $loggerpath
# - $logfile
  • set file permissions:
sudo chown -R $USER:$GROUP .
sudo chmod 400 config.cfg
  • check, if the script works
./dyndns.sh -v
tail $logfile
  • create a crontab (crontab -e -u $USER) like this:
 0/15 * * * * /home/$USER/dyndns.sh 2>&1
#  │  └─┴─┴─┴─ every hour, day, month, weekday
#  └────────── when minute == 15

functionality

  • a crontab will trigger this script (default: every 15 minutes; you can change the interval)
  • this scripts uses curl to request the update-website of the provider. He will notice your ip.
  • the output will be saved as log

dependencies

  • unix based os
  • curl
  • cron
  • logger
  • (logrotate)

supported providers

  • joker.com
  • no-ip.com ?
  • ...

not implemented yet / todo

  • (automatic installation and support for crontab)
  • check if parameter $1 == "-v" (bash is so complicated)

license

Creative Commons License
dyndns-refresh by sedrubal is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

About

small bash-script to refresh your dyn A entry for many providers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages