Skip to content

Commit db62ce1

Browse files
author
Kristan Kenney
committed
Merge branch 'fix-restore-notification-0706'
2 parents c98ea6e + 5861d99 commit db62ce1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

bin/v-backup-user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ if [ -e "$BACKUP/$user.log" ] && [ "$notify" = "yes" ]; then
948948
email=$(get_user_value '$CONTACT')
949949
cat $BACKUP/$user.log |$SENDMAIL -s "$subj" $email $notify
950950
rm $BACKUP/$user.log
951-
$BIN/v-add-user-notification $user "$subj" "$email"
951+
$BIN/v-add-user-notification "$user" "Backup created successfully" "<b>Archive:</b> $user.$backup_new_date.tar"
952952
fi
953953

954954
# Logging

bin/v-restore-user

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,9 @@ chown -R $user:$user $HOMEDIR/$user/tmp
815815
subj="$user → restore has been completed"
816816
cat $tmpdir/restore.log |$SENDMAIL -s "$subj" $email $notify
817817

818+
# Send notification to panel
819+
$HESTIA/bin/v-add-user-notification "$user" "Backup restored successfully" "<b>Archive:</b> $backup"
820+
818821
# Deleting temporary data
819822
rm -rf $tmpdir
820823

@@ -832,6 +835,7 @@ $BIN/v-update-user-counters admin
832835
$BIN/v-update-sys-ip-counters
833836

834837
# Logging
838+
log_history "restored contents from backup archive $backup"
835839
log_event "$OK" "$ARGUMENTS"
836840

837841
exit

0 commit comments

Comments
 (0)