bundlewrap/bundles/pppd/files/dyndns

25 lines
364 B
Text
Raw Permalink Normal View History

2020-11-14 12:46:19 +01:00
#!/usr/bin/env python3
from sys import argv
2023-02-05 17:30:58 +01:00
import requests
2020-11-14 12:46:19 +01:00
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))