Skip to content

Commit

Permalink
Add IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi0n committed Jun 24, 2024
1 parent e0e7744 commit f0d308e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion cloudflare-templatev6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""


################################################
Expand Down Expand Up @@ -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
;;
*)
Expand All @@ -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

0 comments on commit f0d308e

Please sign in to comment.