#!/bin/bash # shellcheck disable=SC1091 thisdir="$( dirname "$(readlink -e -- "${BASH_SOURCE[0]}")")" [ ! -f "$thisdir/.env" ] && { echo "ERROR: .env not exists" exit 1 } source "$thisdir/.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}"