mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-06-14 10:48:56 +02:00
I forgor zone identifer :3
This commit is contained in:
parent
e90d3d4ac4
commit
fd00d43f91
1 changed files with 15 additions and 1 deletions
|
|
@ -636,6 +636,20 @@ in {
|
||||||
${pkgs.util-linux}/bin/logger -s "DDNS Updater: No record_name arg provided; using record_name env: '$record_name'"
|
${pkgs.util-linux}/bin/logger -s "DDNS Updater: No record_name arg provided; using record_name env: '$record_name'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If a zone id was passed as second argument, use it (wrapper now passes it)
|
||||||
|
if [ -n "$2" ]; then
|
||||||
|
zone_identifier="$2"
|
||||||
|
${pkgs.util-linux}/bin/logger -s "DDNS Updater: Using zone_identifier from arg: '$zone_identifier'"
|
||||||
|
else
|
||||||
|
${pkgs.util-linux}/bin/logger -s "DDNS Updater: No zone_identifier arg provided; using zone_identifier env: '$zone_identifier'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fail fast if we still don't have a zone identifier
|
||||||
|
if [ -z "$zone_identifier" ]; then
|
||||||
|
${pkgs.util-linux}/bin/logger -s "DDNS Updater: zone_identifier is empty — cannot proceed (invalid zone)."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
###########################################
|
###########################################
|
||||||
## Check and set the proper auth header
|
## Check and set the proper auth header
|
||||||
###########################################
|
###########################################
|
||||||
|
|
@ -753,7 +767,7 @@ in {
|
||||||
export record_name="$r.${domain}"
|
export record_name="$r.${domain}"
|
||||||
fi
|
fi
|
||||||
# Invoke the single-run script explicitly with the system's bash via env to avoid /bin/bash shebang issues
|
# Invoke the single-run script explicitly with the system's bash via env to avoid /bin/bash shebang issues
|
||||||
${pkgs.bash}/bin/bash /etc/cloudflare-ddns/update-single.sh "$record_name" || true
|
${pkgs.bash}/bin/bash /etc/cloudflare-ddns/update-single.sh "$record_name" "$zone_identifier" || true
|
||||||
done
|
done
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue