pull/83/merge
Rehan Ali 4 weeks ago committed by GitHub
commit bade31b79c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      cloudflare-template.sh
  2. 8
      cloudflare-templatev6.sh

@ -12,7 +12,7 @@ sitename="" # Title of site "Example Sit
slackchannel="" # Slack Channel #example slackchannel="" # Slack Channel #example
slackuri="" # URI for Slack WebHook "https://hooks.slack.com/services/xxxxx" slackuri="" # URI for Slack WebHook "https://hooks.slack.com/services/xxxxx"
discorduri="" # URI for Discord WebHook "https://discordapp.com/api/webhooks/xxxxx" discorduri="" # URI for Discord WebHook "https://discordapp.com/api/webhooks/xxxxx"
msteams_webhook_uri="" # URI for Microsoft Teams WebHook "https://outlook.office.com/webhook/xxxxx"
########################################### ###########################################
## Check if we have a public IP ## Check if we have a public IP
@ -128,5 +128,11 @@ case "$update" in
"content" : "'"$sitename"' Updated: '$record_name''"'"'s'""' new IP Address is '$CURRENT_IP'" "content" : "'"$sitename"' Updated: '$record_name''"'"'s'""' new IP Address is '$CURRENT_IP'"
}' $discorduri }' $discorduri
fi fi
if [[ $msteams_webhook_uri != "" ]]; then
curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST \
--data-raw '{
"text" : "'"$sitename"' Updated: '$record_name''"'"'s'""' new IP Address is '$ip'"
}' $msteams_webhook_uri
fi
exit 0;; exit 0;;
esac esac

@ -39,11 +39,13 @@ log_header_name="DDNS Updater_v6"
# @slackchannel - Slack Channel #example # @slackchannel - Slack Channel #example
# @slackuri - URI for Slack WebHook "https://hooks.slack.com/services/xxxxx" # @slackuri - URI for Slack WebHook "https://hooks.slack.com/services/xxxxx"
# @discorduri - URI for Discord WebHook "https://discordapp.com/api/webhooks/xxxxx" # @discorduri - URI for Discord WebHook "https://discordapp.com/api/webhooks/xxxxx"
# @msteams_webhook_uri - URI for Microsoft Teams WebHook "https://outlook.office.com/webhook/xxxxx"
# -------------------------------------------------- # # -------------------------------------------------- #
sitename="" sitename=""
slackchannel="" slackchannel=""
slackuri="" slackuri=""
discorduri="" discorduri=""
msteams_webhook_uri=""
@ -181,6 +183,12 @@ case "$update" in
\"content\": \"$sitename Updated: $record_name's new IPv6 Address is $ip\" \"content\": \"$sitename Updated: $record_name's new IPv6 Address is $ip\"
}" $discorduri }" $discorduri
fi fi
if [[ $msteams_webhook_uri != "" ]]; then
curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST \
--data-raw "{
\"text\": \"$sitename Updated: $record_name's new IPv6 Address is $ip\"
}" $msteams_webhook_uri
fi
exit 0 exit 0
;; ;;
esac esac

Loading…
Cancel
Save