mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-14 23:38:15 +01:00
first change to DSM
This commit is contained in:
parent
48057dfc66
commit
965f2dd825
1 changed files with 9 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
### DISCLAIMER: This is a third party addition to dockcheck - best effort testing.
|
||||
# INFO: ssmtp is depcerated - consider to use msmtp instead.
|
||||
NOTIFY_DSM_VERSION="v0.1"
|
||||
# INFO: ssmtp is deprecated - consider to use msmtp instead.
|
||||
#
|
||||
# Copy/rename this file to notify.sh to enable the notification snipppet.
|
||||
# mSMTP/sSMTP has to be installed and configured manually.
|
||||
|
|
@ -70,5 +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
|
||||
|
||||
trigger_notification
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue