Franziska Kunsmann
bd10dc578f
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
We don't care about what the DNS provider said when updating the ip address. The only thing we care about is wether the current external ip of the system matches the resolved ip address.
23 lines
363 B
Python
23 lines
363 B
Python
#!/usr/bin/env python3
|
|
|
|
import requests
|
|
from sys import argv
|
|
|
|
INTERFACE = argv[1]
|
|
LOCAL_IP = argv[4]
|
|
|
|
UPDATE_URL = '${url}'
|
|
USERNAME = '${username}'
|
|
PASSWORD = '${password}'
|
|
|
|
r = requests.get(
|
|
UPDATE_URL.format(
|
|
ip=LOCAL_IP,
|
|
),
|
|
auth=(
|
|
USERNAME,
|
|
PASSWORD,
|
|
)
|
|
)
|
|
|
|
print('got status {} when updating dns'.format(r.status_code))
|