bundlewrap/bundles/pppd/files/dyndns
Franzi bd10dc578f
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
bundles/pppd: refactor check_dyndns_update
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.
2021-08-14 08:00:43 +02:00

24 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))