mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-15 07:48:14 +01:00
added versions + version checks to all templates
This commit is contained in:
parent
965f2dd825
commit
fd1769c30f
11 changed files with 100 additions and 20 deletions
|
|
@ -71,12 +71,12 @@ dockcheck_notification() {
|
|||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "Installed version: $1\nLatest version: $2\n\nChangenotes: $3\n"
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_DSM.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_DSM_VERSION/s/NOTIFY_DSM_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_DSM_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nNOTIFY_DSM update avialable:\n $NOTIFY_DSM_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_DSM.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_DSM_VERSION/s/NOTIFY_DSM_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_DSM_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_DSM.sh update avialable:\n $NOTIFY_DSM_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
NOTIFY_APPRISE_VERSION="v0.1"
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snippet.
|
||||
# Required receiving services must already be set up.
|
||||
|
|
@ -38,10 +39,17 @@ send_notification() {
|
|||
### to not send notifications when dockcheck itself has updates.
|
||||
dockcheck_notification() {
|
||||
printf "\nSending Apprise dockcheck notification\n"
|
||||
|
||||
|
||||
MessageTitle="$FromHost - New version of dockcheck available."
|
||||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "Installed version: $1 \nLatest version: $2 \n\nChangenotes: $3"
|
||||
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_apprise.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_APPRISE_VERSION/s/NOTIFY_APPRISE_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_APPRISE_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_apprise.sh update avialable:\n $NOTIFY_APPRISE_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
NOTIFY_DISCORD_VERSION="v0.1"
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snippet.
|
||||
# Required receiving services must already be set up.
|
||||
|
|
@ -31,5 +32,12 @@ dockcheck_notification() {
|
|||
printf "\nSending Discord dockcheck notification\n"
|
||||
MessageBody="$FromHost - New version of dockcheck available: \n Installed version: $1 \nLatest version: $2 \n\nChangenotes: $3"
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_discord.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_DISCORD_VERSION/s/NOTIFY_DISCORD_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_DISCORD_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_discord.sh update avialable:\n $NOTIFY_DISCORD_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
NOTIFY_GENERIC_VERSION="v0.1"
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snippet.
|
||||
# generic sample, the "Hello World" of notification addons
|
||||
|
|
@ -14,12 +15,12 @@ trigger_notification() {
|
|||
send_notification() {
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
|
||||
|
||||
# platform specific notification code would go here
|
||||
printf "\n%bGeneric notification addon:%b" "$c_green" "$c_reset"
|
||||
MessageTitle="$FromHost - updates available."
|
||||
printf -v MessageBody "🐋 Containers on $FromHost with updates available:\n$UpdToString"
|
||||
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
||||
|
|
@ -27,10 +28,17 @@ send_notification() {
|
|||
### to not send notifications when dockcheck itself has updates.
|
||||
dockcheck_notification() {
|
||||
printf "\nGeneric dockcheck notification\n"
|
||||
|
||||
|
||||
MessageTitle="$FromHost - New version of dockcheck available."
|
||||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "Installed version: $1 \nLatest version: $2 \n\nChangenotes: $3"
|
||||
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_generic.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_GENERIC_VERSION/s/NOTIFY_GENERIC_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_GENERIC_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_generic.sh update avialable:\n $NOTIFY_GENERIC_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
NOTIFY_GOTIFY_VERSION="v0.1"
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snippet.
|
||||
# Required receiving services must already be set up.
|
||||
|
|
@ -41,5 +42,12 @@ dockcheck_notification() {
|
|||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "Installed version: $1 \nLatest version: $2 \n\nChangenotes: $3"
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_gotify.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_GOTIFY_VERSION/s/NOTIFY_GOTIFY_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_GOTIFY_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_gotify.sh update avialable:\n $NOTIFY_GOTIFY_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
NOTIFY_MATRIX_VERSION="v0.1"
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snippet.
|
||||
# Required receiving services must already be set up.
|
||||
|
|
@ -34,10 +35,17 @@ send_notification() {
|
|||
### to not send notifications when dockcheck itself has updates.
|
||||
dockcheck_notification() {
|
||||
printf "\nSending Matrix dockcheck notification\n"
|
||||
|
||||
|
||||
MessageTitle="$FromHost - New version of dockcheck available."
|
||||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "Installed version: $1 \nLatest version: $2 \n\nChangenotes: $3"
|
||||
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_matrix.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_MATRIX_VERSION/s/NOTIFY_MATRIX_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_MATRIX_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_matrix.sh update avialable:\n $NOTIFY_MATRIX_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
NOTIFY_NTFYSH_VERSION="v0.1"
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snippet.
|
||||
# Setup app and subscription at https://ntfy.sh
|
||||
|
|
@ -33,10 +34,17 @@ send_notification() {
|
|||
### to not send notifications when dockcheck itself has updates.
|
||||
dockcheck_notification() {
|
||||
printf "\nSending ntfy.sh dockcheck notification\n"
|
||||
|
||||
|
||||
MessageTitle="$FromHost - New version of dockcheck available."
|
||||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "Installed version: $1 \nLatest version: $2 \n\nChangenotes: $3"
|
||||
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_ntfy-sh.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_NTFYSH_VERSION/s/NOTIFY_NTFYSH_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_NTFYSH_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_ntfy-sh.sh update avialable:\n $NOTIFY_NTFYSH_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
NOTIFY_PUSHBULLET_VERSION="v0.1"
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snippet.
|
||||
# Required receiving services must already be set up.
|
||||
|
|
@ -39,5 +40,12 @@ dockcheck_notification() {
|
|||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "Installed version: $1 \nLatest version: $2 \n\nChangenotes: $3"
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_pushbullet.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_PUSHBULLET_VERSION/s/NOTIFY_PUSHBULLET_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_PUSHBULLET_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_pushbullet.sh update avialable:\n $NOTIFY_PUSHBULLET_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
NOTIFY_PUSHOVER_VERSION="v0.1"
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snippet.
|
||||
# Required receiving services must already be set up.
|
||||
|
|
@ -40,10 +41,17 @@ send_notification() {
|
|||
### to not send notifications when dockcheck itself has updates.
|
||||
dockcheck_notification() {
|
||||
printf "\nSending pushover dockcheck notification\n"
|
||||
|
||||
|
||||
MessageTitle="$FromHost - New version of dockcheck available."
|
||||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "Installed version: $1 \nLatest version: $2 \n\nChangenotes: $3"
|
||||
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_pushover.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_PUSHOVER_VERSION/s/NOTIFY_PUSHOVER_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_PUSHOVER_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_pushover.sh update avialable:\n $NOTIFY_PUSHOVER_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
NOTIFY_SMTP_VERSION="v0.1"
|
||||
# INFO: ssmtp is depcerated - consider to use msmtp instead.
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snipppet.
|
||||
|
|
@ -59,5 +60,12 @@ dockcheck_notification() {
|
|||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "Installed version: $1 \nLatest version: $2 \n\nChangenotes: $3"
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_smtp.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_SMTP_VERSION/s/NOTIFY_SMTP_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_SMTP_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_smtp.sh update avialable:\n $NOTIFY_SMTP_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
NOTIFY_TELEGRAM_VERSION="v0.1"
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snippet.
|
||||
# Required receiving services must already be set up.
|
||||
|
|
@ -34,10 +35,17 @@ send_notification() {
|
|||
### to not send notifications when dockcheck itself has updates.
|
||||
dockcheck_notification() {
|
||||
printf "\nSending Telegram dockcheck notification\n"
|
||||
|
||||
|
||||
MessageTitle="$FromHost - New version of dockcheck available."
|
||||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "$FromHost - New version of dockcheck available.\n\nInstalled version: $1 \nLatest version: $2 \n\nChangenotes: $3"
|
||||
|
||||
|
||||
RawNotifyUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/notify_templates/notify_telegram.sh"
|
||||
LatestNotifyRelease="$(curl -s -r 0-150 $RawNotifyUrl | sed -n "/NOTIFY_TELEGRAM_VERSION/s/NOTIFY_TELEGRAM_VERSION=//p" | tr -d '"')"
|
||||
if [[ "$NOTIFY_TELEGRAM_VERSION" != "$LatestNotifyRelease" ]] ; then
|
||||
printf -v NotifyUpdate "\n\nnotify_telegram.sh update avialable:\n $NOTIFY_TELEGRAM_VERSION -> $LatestNotifyRelease\n"
|
||||
MessageBody="${MessageBody}${NotifyUpdate}"
|
||||
fi
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue