view hostname during notifications (#2074)

This commit is contained in:
Daniel Hansson 2021-08-07 14:59:51 +02:00 committed by GitHub
parent 3207342747
commit 993bdde5e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

4
lib.sh
View File

@ -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

View File

@ -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