]> git.p6c8.net - nextcloud-backup-restore.git/blobdiff - NextcloudBackup.sh
When backup is cancelled, restart the webserver
[nextcloud-backup-restore.git] / NextcloudBackup.sh
index ce9601a84107921fa33ebb799f600669e8e27435..72bc4a08c398e4e9be7a1079535cd42fa53d49a8 100644 (file)
@@ -3,7 +3,7 @@
 #
 # Bash script for creating backups of Nextcloud.
 #
-# Version 1.0.0
+# Version 1.1.1
 #
 # Usage:
 #      - With backup directory specified in the script:  ./NextcloudBackup.sh
@@ -26,8 +26,6 @@ if [ -z "$backupMainDir" ]; then
     backupMainDir='/media/hdd/nextcloud_backup'
 fi
 
-echo "Backup directory: $backupMainDir"
-
 currentDate=$(date +"%Y%m%d_%H%M%S")
 
 # The actual directory of the current backup - this is a subdirectory of the main directory above with a timestamp
@@ -103,9 +101,19 @@ function CtrlC() {
                echo "Maintenance mode still enabled."
        fi
 
+       echo "Starting web server..."
+       systemctl start "${webserverServiceName}"
+       echo "Done"
+       echo
+
        exit 1
 }
 
+#
+# Print information
+#
+echo "Backup directory: ${backupMainDir}"
+
 #
 # Check for root
 #

patrick-canterino.de