|
|
|
@ -12,6 +12,8 @@ sitename="" # Title of site "Example Sit |
|
|
|
|
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" |
|
|
|
|
ntfyuri="ntfy.sh" # URI for ntfy server. Default is ntfy.sh |
|
|
|
|
ntfytopic="" # Topic for ntfy.sh "https://ntfy.sh/xxxxx" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
########################################### |
|
|
|
@ -103,6 +105,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')." \ |
|
|
|
|
$ntfyuri/$ntfytopic |
|
|
|
|
fi |
|
|
|
|
exit 1;; |
|
|
|
|
*) |
|
|
|
|
logger "DDNS Updater: $ip $record_name DDNS updated." |
|
|
|
@ -119,5 +129,11 @@ case "$update" in |
|
|
|
|
"content" : "'"$sitename"' Updated: '$record_name''"'"'s'""' new IP Address is '$ip'" |
|
|
|
|
}' $discorduri |
|
|
|
|
fi |
|
|
|
|
if [[ $ntfytopic != "" ]]; then |
|
|
|
|
curl \ |
|
|
|
|
-H "Title: $sitename Updated" \ |
|
|
|
|
-d $record_name"'s new IP Address is '$ip'" \ |
|
|
|
|
$ntfyuri/$ntfytopic |
|
|
|
|
fi |
|
|
|
|
exit 0;; |
|
|
|
|
esac |
|
|
|
|