This commit is contained in:
2025-07-02 13:29:40 +08:00
parent b5983ed308
commit e0fbdf852e
5 changed files with 50 additions and 0 deletions

21
tools/duckdns/update.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/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}"