mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-14 23:38:15 +01:00
Added releasenotes-logic to all templates, fix to DSM+smtp
This commit is contained in:
parent
8b40dce2cd
commit
319b43bc1b
9 changed files with 19 additions and 19 deletions
|
|
@ -9,17 +9,17 @@
|
|||
MSMTP=$(which msmtp)
|
||||
SSMTP=$(which ssmtp)
|
||||
|
||||
if [ -n $MSMPT ] ; then
|
||||
MAIL=$MSMTP
|
||||
elif [ -n $SSMTP ] && [ -z $MAIL ] ; then
|
||||
MAIL=$SSMTP
|
||||
if [ -n "$MSMPT" ] ; then
|
||||
MailPkg=$MSMTP
|
||||
elif [ -n "$SSMTP" ] ; then
|
||||
MailPkg=$SSMTP
|
||||
else
|
||||
echo "No msmtp or ssmtp binary found in PATH: $PATH" ; exit 1
|
||||
fi
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
CfgFile="/usr/syno/etc/synosmtp.conf"
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ SenderMail=${SenderMail:-$(grep 'eventmail1' $CfgFile | sed -n 's/.*"\([^"]*\)".
|
|||
|
||||
printf "\nSending email notification.\n"
|
||||
|
||||
$MAIL $SendMailTo << __EOF
|
||||
$MailPkg $SendMailTo << __EOF
|
||||
From: "$SenderName" <$SenderMail>
|
||||
date:$(date -R)
|
||||
To: <$SendMailTo>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
printf "\nSending Apprise notification\n"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
printf "\nSending ntfy.sh notification\n"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
|
|
|
|||
|
|
@ -8,17 +8,17 @@
|
|||
MSMTP=$(which msmtp)
|
||||
SSMTP=$(which ssmtp)
|
||||
|
||||
if [ -n $MSMPT ] ; then
|
||||
MAIL=$MSMTP
|
||||
elif [ -n $SSMTP ] && [ -z $MAIL ] ; then
|
||||
MAIL=$SSMTP
|
||||
if [ -n "$MSMPT" ] ; then
|
||||
MailPkg=$MSMTP
|
||||
elif [ -n "$SSMTP" ] ; then
|
||||
MailPkg=$SSMTP
|
||||
else
|
||||
echo "No msmtp or ssmtp binary found in PATH: $PATH" ; exit 1
|
||||
fi
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# User variables:
|
||||
|
|
@ -28,7 +28,7 @@ SubjectTag="dockcheck"
|
|||
|
||||
printf "\nSending email notification.\n"
|
||||
|
||||
$MAIL $SendMailTo << __EOF
|
||||
$MailPkg $SendMailTo << __EOF
|
||||
From: "$FromHost" <$SendMailFrom>
|
||||
date:$(date -R)
|
||||
To: <$SendMailTo>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue