Files
shell/tools/duckdns/update.sh
2025-07-02 13:29:40 +08:00

22 lines
406 B
Bash
Executable File

#!/bin/bash
# shellcheck disable=SC1091
[ ! -f .env ] && {
echo "ERROR: .env not exists"
exit 1
}
source .env
[ -z "$DUCK_TOKEN" ] && {
echo "ERROR: env var DUCK_TOKEN not specified"
exit 1
}
[ -z "$DUCK_DOMAINS" ] && {
echo "ERROR: env var DUCK_DOMAINS not specified"
exit 1
}
curl -k "https://www.duckdns.org/update?domains=${DUCK_DOMAINS}&token=${DUCK_TOKEN}&ip=${DUCK_IP}"