Private GIT

Skip to content
Snippets Groups Projects
Select Git revision
  • 6501e15c17fd2b2775d228ab862c4fcad6c45673
  • master default protected
  • development
  • MonTest
  • gh-pages
  • ThePirateBay
  • Pistachitos
  • custom_naming
  • dataTables
  • libdirs
  • nzbs_org_transition
  • api
  • timezones
  • adel-0002
  • adel-0001
  • build-497
  • build-496
  • build-495
  • build-494
  • build-493
  • build-492
  • build-491
  • build-490
  • build-489
  • build-488
  • build-487
  • build-486
  • build-485
  • build-484
  • build-483
  • build-482
  • build-481
  • build-480
33 results

inc_bottom.tmpl

Blame
  • README.md 997 B

    Python script to update DNS A record of your domain dynamically using gandi.net LiveDNS API:

    http://doc.livedns.gandi.net/

    The script was developed for those behind a dynamic IP interface (e.g. home server/pi/nas).

    The config-template.txt file should be renamed to config.txt, and modified with your gandi.net API key, domain name, and A-record (@, dev, home, pi, etc).

    Every time the script runs, it will query an external service to retrieve the external IP of the machine, compare it to the current A record in the zone at gandi.net, and then update the record if the IP has changed.

    Requirements:

    • ipaddress module (pip install ipaddress)
    • requests module (pip install requests)
    • json module (pip install json)

    You can then run the script as a cron job :

    */15 * * * * python /home/user/gandi-ddns.py

    macOS

    cd gandi-ddns
    ln -s $(pwd) /usr/local/gandi-ddns
    sudo cp gandi.ddns.plist /Library/LaunchDaemons/
    sudo launchctl /Library/LaunchDaemons/gandi.ddns.plist