diff --git a/upgrade/UPGRADE.md b/upgrade/UPGRADE.md index 1c796103..be984d39 100644 --- a/upgrade/UPGRADE.md +++ b/upgrade/UPGRADE.md @@ -1,16 +1,19 @@ -Upgrade the OpenXE system. +OpenXE upgrade system NOTE: The upgrade system is for use in LINUX only and needs to have git installed. +The following steps are executed: 1. get files from git 2. run database upgrade Files in this directory: UPGRADE.md -> This file -upgrade.php -> The upgrade program +upgrade.sh -> The upgrade starter, execute with "./upgrade.sh". Execute without parameters to view possible options. Files in the data subdirectory: -.in_progress.flag -> if this file exists, an upgrade is in progress, system will be locked +upgrade.php -> The upgrade program db_schema.json -> Contains the nominal database structure +exported_db_schema.json -> Contains the exported database structure (optional) remote.json -> Contains the git remote & branch which should be used for upgrade +upgrade.log -> Contains the output from the last run that was started from within OpenXE diff --git a/upgrade/upgrade.php b/upgrade/data/upgrade.php similarity index 100% rename from upgrade/upgrade.php rename to upgrade/data/upgrade.php diff --git a/upgrade/upgrade.sh b/upgrade/upgrade.sh new file mode 100644 index 00000000..944827c1 --- /dev/null +++ b/upgrade/upgrade.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo -u www-data php data/upgrade.php "$@" diff --git a/www/pages/content/upgrade.tpl b/www/pages/content/upgrade.tpl index cd6439e8..3acd5379 100644 --- a/www/pages/content/upgrade.tpl +++ b/www/pages/content/upgrade.tpl @@ -15,9 +15,10 @@
- {|Info|} + {|OpenXE Upgrade-System|} Das Upgrade funktioniert in 2 Schritten: Dateien aktualisieren, Datenbank auffrischen. Wenn das Upgrade lange läuft, kann der Fortschritt in einem neuen Fenster mit "Anzeige auffrischen" angezeigt werden.

-Zum Start in der Konsole, im Unterordner "upgrade" diesen Befehl starten:
sudo -u www-data php upgrade.php -do
+Falls nach einem Abbruch oder schwerwiegenden Fehler kein Upgrade möglich ist, im Hauptordner den Ordner ".git" löschen und das Upgrade in der Konsole erneut durchführen. +Dazu im Unterordner "upgrade" diesen Befehl starten:
./upgrade.sh -do
diff --git a/www/pages/upgrade.php b/www/pages/upgrade.php index eb99e9e7..400d22fd 100644 --- a/www/pages/upgrade.php +++ b/www/pages/upgrade.php @@ -33,7 +33,7 @@ class upgrade { $this->app->Tpl->Set('DETAILS_ANZEIGEN', $verbose?"checked":""); $this->app->Tpl->Set('DB_DETAILS_ANZEIGEN', $db_verbose?"checked":""); - include("../upgrade/upgrade.php"); + include("../upgrade/data/upgrade.php"); $logfile = "../upgrade/data/upgrade.log"; upgrade_set_out_file_name($logfile);