18 lines
327 B
Bash
Executable file
18 lines
327 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -u
|
|
set -x
|
|
|
|
function url() {
|
|
echo "https://svc.joker.com/nic/update?username=$1&password=$2&hostname=$3"
|
|
}
|
|
|
|
IFS=':'
|
|
read -r user password < "${DDNS_CREDENTIALS:-/var/lib/ddns/credentials}"
|
|
unset IFS
|
|
|
|
curl_url=$(url "$user" "$password" bs.vpn.dadada.li)
|
|
|
|
curl -4 "$curl_url"
|
|
curl -6 "$curl_url"
|