bundlewrap/bundles/pppd/files/dyndns

24 lines
364 B
Python

#!/usr/bin/env python3
from sys import argv
import requests
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))