From 342ff271ca9bf8a355366344c0c83662c949ce96 Mon Sep 17 00:00:00 2001 From: mag37 Date: Wed, 3 Jan 2024 11:01:41 +0100 Subject: [PATCH] Update notify_DSM.sh Added the passed array to a variable. Created printable string with newlines. --- notify_DSM.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/notify_DSM.sh b/notify_DSM.sh index bfb8cac..e6d6916 100644 --- a/notify_DSM.sh +++ b/notify_DSM.sh @@ -1,7 +1,8 @@ # copy/rename this file to notify.sh to enable email notifications on synology DSM send_notification() { - +Updates=("$@") +UpdToString=$( printf "%s\n" "${Updates[@]}" ) # change this to your usual destination for synology DSM notification emails SendMailTo=me@mydomain.com FromHost=$(hostname) @@ -18,8 +19,9 @@ Content-Transfer-Encoding: 7bit The following docker packages on $FromHost need to be updated: -$@ +"$UpdToString" + +From $FromHost - From $FromHost __EOF -} \ No newline at end of file +}