mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-06-13 18:28:55 +02:00
Update DDNS Updater to use record name from argument.
This commit is contained in:
parent
70c82683f6
commit
afe8d51b75
1 changed files with 7 additions and 5 deletions
|
|
@ -628,10 +628,12 @@ in {
|
|||
fi
|
||||
done
|
||||
|
||||
# Exit if IP fetching failed
|
||||
if [[ -z "''${CURRENT_IP}" ]]; then
|
||||
${pkgs.util-linux}/bin/logger -s "DDNS Updater: Failed to find a valid IP."
|
||||
exit 2
|
||||
# If a record name was passed as first argument, use it (wrapper now passes it)
|
||||
if [ -n "$1" ]; then
|
||||
record_name="$1"
|
||||
${pkgs.util-linux}/bin/logger -s "DDNS Updater: Using record_name from arg: '$record_name'"
|
||||
else
|
||||
${pkgs.util-linux}/bin/logger -s "DDNS Updater: No record_name arg provided; using record_name env: '$record_name'"
|
||||
fi
|
||||
|
||||
###########################################
|
||||
|
|
@ -749,7 +751,7 @@ in {
|
|||
export record_name="$r.${domain}"
|
||||
fi
|
||||
# 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 || true
|
||||
${pkgs.bash}/bin/bash /etc/cloudflare-ddns/update-single.sh "$record_name" || true
|
||||
done
|
||||
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue