Private GIT

Skip to content
Snippets Groups Projects
Commit 951f9af8 authored by fmonthel's avatar fmonthel
Browse files

Update ReadMe

parent 27454aa1
Branches
No related tags found
No related merge requests found
...@@ -9,14 +9,13 @@ The config-template.txt file should be renamed to config.txt, and modified with ...@@ -9,14 +9,13 @@ The config-template.txt file should be renamed to config.txt, and modified with
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. 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: Requirements:
- ipaddress module (pip install ipaddress)
- requests module (pip install requests) pip install -r requirements.txt
- json module (pip install json)
You can then run the script as a cron job : You can then run the script as a cron job :
``` ```
*/15 * * * * python /home/user/gandi-ddns.py */15 * * * * python /home/user/gandi_ddns.py
``` ```
macOS macOS
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<key>ProgramArguments</key> <key>ProgramArguments</key>
<array> <array>
<string>/usr/local/bin/python3</string> <string>/usr/local/bin/python3</string>
<string>gandi-ddns.py</string> <string>gandi_ddns.py</string>
</array> </array>
<key>RunAtLoad</key> <key>RunAtLoad</key>
......
File moved
import gandi-ddns as script import gandi_ddns as script
def test_get_ip(): def test_get_ip():
assert script.get_ip() == 'test-toto' assert script.get_ip() == 'test-toto'
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment