duckdns
This commit is contained in:
21
tools/duckdns/update.sh
Executable file
21
tools/duckdns/update.sh
Executable 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}"
|
||||
Reference in New Issue
Block a user