scripts/bin/ddns
2021-05-02 16:31:17 +02:00

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"