Allow DYNDNS update script to use env creds
This commit is contained in:
parent
070c3e1575
commit
28a313830b
1 changed files with 6 additions and 4 deletions
|
|
@ -4,12 +4,14 @@ set -euo pipefail
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
AUTH_FILE="creds/joker_com_dyndns_creds.txt"
|
AUTH_FILE="creds/joker_com_dyndns_creds.txt"
|
||||||
if [[ ! -f "$AUTH_FILE" ]]; then
|
if [[ -f "$AUTH_FILE" ]]; then
|
||||||
echo "Joker DYNDNS credentials missing at $AUTH_FILE" >&2
|
JOKER_AUTH="$(cat "$AUTH_FILE")"
|
||||||
|
elif [[ -n "${JOKER_DYNDNS_USERNAME:-}" && -n "${JOKER_DYNDNS_PASSWORD:-}" ]]; then
|
||||||
|
JOKER_AUTH="${JOKER_DYNDNS_USERNAME}:${JOKER_DYNDNS_PASSWORD}"
|
||||||
|
else
|
||||||
|
echo "Joker DYNDNS credentials missing (file $AUTH_FILE or env JOKER_DYNDNS_USERNAME/PASSWORD)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
JOKER_AUTH="$(cat "$AUTH_FILE")"
|
|
||||||
TARGET_IP="${TARGET_IP:-157.180.66.64}"
|
TARGET_IP="${TARGET_IP:-157.180.66.64}"
|
||||||
LOGS_HOST="${LOGS_HOST:-logs.lomavuokraus.fi}"
|
LOGS_HOST="${LOGS_HOST:-logs.lomavuokraus.fi}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue