mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-06-13 18:28:55 +02:00
Fix broken bash URI edge-case
This commit is contained in:
parent
84fdf8d93b
commit
d8d7e721a1
1 changed files with 4 additions and 4 deletions
|
|
@ -688,11 +688,11 @@ in {
|
|||
case "$update" in
|
||||
*"\\\"success\\\":false"*)
|
||||
echo -e "DDNS Updater: $${CURRENT_IP} $${record_name} DDNS failed for $${record_identifier} ($${CURRENT_IP}). DUMPING RESULTS:\n$update" | ${pkgs.util-linux}/bin/logger -s
|
||||
if [[ -n "$${slackuri}" ]]; then
|
||||
if [[ $slackuri != "" ]]; then
|
||||
msg="$${sitename} DDNS Update Failed: $${record_name}: $${record_identifier} ($${CURRENT_IP})."
|
||||
${pkgs.curl}/bin/curl -L -X POST "$${slackuri}" --data-raw "{\"channel\":\"$${slackchannel}\",\"text\":\"$${msg}\"}"
|
||||
fi
|
||||
if [[ -n "$${discorduri}" ]]; then
|
||||
if [[ $discorduri != "" ]]; then
|
||||
msg="$${sitename} DDNS Update Failed: $${record_name}: $${record_identifier} ($${CURRENT_IP})."
|
||||
${pkgs.curl}/bin/curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data-raw "{\"content\":\"$${msg}\"}" "$${discorduri}"
|
||||
fi
|
||||
|
|
@ -700,10 +700,10 @@ in {
|
|||
*)
|
||||
msg="$${sitename} Updated: $${record_name}'s new IP Address is $${CURRENT_IP}"
|
||||
${pkgs.util-linux}/bin/logger "DDNS Updater: $${CURRENT_IP} $${record_name} DDNS updated."
|
||||
if [[ -n "$${slackuri}" ]]; then
|
||||
if [[ $slackuri != "" ]]; then
|
||||
${pkgs.curl}/bin/curl -L -X POST "$${slackuri}" --data-raw "{\"channel\":\"$${slackchannel}\",\"text\":\"$${msg}\"}"
|
||||
fi
|
||||
if [[ -n "$${discorduri}" ]]; then
|
||||
if [[ $discorduri != "" ]]; then
|
||||
${pkgs.curl}/bin/curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data-raw "{\"content\":\"$${msg}\"}" "$${discorduri}"
|
||||
fi
|
||||
exit 0;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue