bundlewrap/bundles/pppd/files/dyndns

24 lines
363 B
Text
Raw Normal View History

2020-11-14 11:46:19 +00:00
#!/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))