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
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Exit if IP fetching failed
|
# If a record name was passed as first argument, use it (wrapper now passes it)
|
||||||
if [[ -z "''${CURRENT_IP}" ]]; then
|
if [ -n "$1" ]; then
|
||||||
${pkgs.util-linux}/bin/logger -s "DDNS Updater: Failed to find a valid IP."
|
record_name="$1"
|
||||||
exit 2
|
${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
|
fi
|
||||||
|
|
||||||
###########################################
|
###########################################
|
||||||
|
|
@ -749,7 +751,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 || true
|
${pkgs.bash}/bin/bash /etc/cloudflare-ddns/update-single.sh "$record_name" || true
|
||||||
done
|
done
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue