From f0d308edc2d7e89a2bfacd2825bd3f397871c9b1 Mon Sep 17 00:00:00 2001 From: Avi0n <14863961+Avi0n@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:08:33 -0700 Subject: [PATCH] Add IPv6 --- cloudflare-templatev6.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/cloudflare-templatev6.sh b/cloudflare-templatev6.sh index 54b91f8..406f779 100644 --- a/cloudflare-templatev6.sh +++ b/cloudflare-templatev6.sh @@ -39,12 +39,13 @@ log_header_name="DDNS Updater_v6" # @slackchannel - Slack Channel #example # @slackuri - URI for Slack WebHook "https://hooks.slack.com/services/xxxxx" # @discorduri - URI for Discord WebHook "https://discordapp.com/api/webhooks/xxxxx" +# @ntfytopic - Topic for Ntfy.sh "https://ntfy.sh/xxxxx" # -------------------------------------------------- # sitename="" slackchannel="" slackuri="" discorduri="" - +ntfytopic="" ################################################ @@ -164,6 +165,14 @@ case "$update" in \"content\": \"$sitename DDNS Update Failed: $record_name: $record_identifier ($ip).\" }" $discorduri fi + if [[ $ntfytopic != "" ]]; then + curl \ + -H "Title: $sitename DDNS Update Failed" \ + -H "Priority: urgent" \ + -H "Tags: warning" \ + -d "$record_name: $record_identifier ($ip)." \ + ntfy.sh/$ntfytopic + fi exit 1 ;; *) @@ -181,6 +190,12 @@ case "$update" in \"content\": \"$sitename Updated: $record_name's new IPv6 Address is $ip\" }" $discorduri fi + if [[ $ntfytopic != "" ]]; then + curl \ + -H "Title: $sitename Updated" \ + -d $record_name"'s new IP Address is $ip" \ + ntfy.sh/$ntfytopic + fi exit 0 ;; esac