From 993bdde5e796e529e413cbcc465fee584d89ede8 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Sat, 7 Aug 2021 14:59:51 +0200 Subject: [PATCH] view hostname during notifications (#2074) --- lib.sh | 4 ++-- nextcloud_update.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib.sh b/lib.sh index d146bfb1..301dd0bd 100644 --- a/lib.sh +++ b/lib.sh @@ -1756,7 +1756,7 @@ fi for admin in "${NC_ADMIN_USER[@]}" do print_text_in_color "$IGreen" "Posting '$1' to: $admin" - nextcloud_occ_no_check notification:generate -l "$2" "$admin" "$1" + nextcloud_occ_no_check notification:generate -l "$2" "$admin" "$(hostname -f): $1" done } @@ -1771,7 +1771,7 @@ send_mail() { if [ -n "$RECIPIENT" ] then print_text_in_color "$ICyan" "Sending '$1' to $RECIPIENT" - if echo -e "$2" | mail -s "NcVM - $1" "$RECIPIENT" + if echo -e "$2" | mail -s "NcVM: $(hostname -f) - $1" "$RECIPIENT" then return 0 fi diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 239c8825..3cad6e47 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -563,7 +563,7 @@ if [ -n "$UPDATED_APPS" ] then print_text_in_color "$IGreen" "$UPDATED_APPS" notify_admin_gui \ - "Nextcloud apps just got updated!" \ + "Your apps just got updated!" \ "$UPDATED_APPS" # Just make sure everything is updated (sometimes app requires occ upgrade to be run) nextcloud_occ upgrade