From 4bda949e239a92b01212562e693e05fd4051effe Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Mon, 20 Aug 2018 10:22:37 +0100
Subject: [PATCH] Project name in backup notification subject lines

---
 src/freedombone-installer | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/freedombone-installer b/src/freedombone-installer
index ed0f3d911..17177ddb2 100755
--- a/src/freedombone-installer
+++ b/src/freedombone-installer
@@ -1042,10 +1042,10 @@ function backup_and_restore {
           echo "if /usr/local/bin/${PROJECT_NAME}-restore-local simple >> $webadmin_install_dir/restore.txt; then";
           echo "    echo \"Completed \$(date)\" >> $webadmin_install_dir/restore.txt";
           echo "    cp $webadmin_install_dir/restore_complete.html $webadmin_install_dir/restore_progress.html";
-          echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$restore_success_message\" -s \"$restore_title\"";
+          echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$restore_success_message\" -s \"[${PROJECT_NAME}] $restore_title\"";
           echo 'else';
           echo "    cp $webadmin_install_dir/restore_failed.html $webadmin_install_dir/restore_progress.html";
-          echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$restore_failed_message\" -s \"$restore_title\"";
+          echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$restore_failed_message\" -s \"[${PROJECT_NAME}] $restore_title\"";
           echo 'fi';
           echo '';
           echo "chown www-data:www-data $webadmin_install_dir/restore.txt";
@@ -1076,10 +1076,10 @@ function backup_and_restore {
               echo "if /usr/local/bin/${PROJECT_NAME}-backup-local simple >> $webadmin_install_dir/backup.txt; then";
               echo "    echo \"Completed \$(date)\" >> $webadmin_install_dir/backup.txt";
               echo "    cp $webadmin_install_dir/backup_complete.html $webadmin_install_dir/backup_progress.html";
-              echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$backup_success_message\" -s \"$backup_title\"";
+              echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$backup_success_message\" -s \"[${PROJECT_NAME}] $backup_title\"";
               echo 'else';
               echo "    cp $webadmin_install_dir/backup_failed.html $webadmin_install_dir/backup_progress.html";
-              echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$backup_failed_message\" -s \"$backup_title\"";
+              echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$backup_failed_message\" -s \"[${PROJECT_NAME}] $backup_title\"";
               echo 'fi';
               echo '';
               echo "chown www-data:www-data $webadmin_install_dir/backup.txt";
@@ -1103,10 +1103,10 @@ function backup_and_restore {
                 check_for_existing_processes $format_script
                 { echo "if /usr/local/bin/${PROJECT_NAME}-format simple > $webadmin_install_dir/format.txt; then";
                   echo "    cp $webadmin_install_dir/format_complete.html $webadmin_install_dir/format_progress.html";
-                  echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$format_success_message\" -s \"$format_title\"";
+                  echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$format_success_message\" -s \"[${PROJECT_NAME}] $format_title\"";
                   echo 'else';
                   echo "    cp $webadmin_install_dir/format_failed.html $webadmin_install_dir/format_progress.html";
-                  echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$format_failed_message\" -s \"$format_title\"";
+                  echo "    /usr/local/bin/${PROJECT_NAME}-notification -m \"$format_failed_message\" -s \"[${PROJECT_NAME}] $format_title\"";
                   echo 'fi';
                   echo "chown www-data:www-data $webadmin_install_dir/format_progress.html";
                   echo '';
-- 
GitLab