upgrade some usability improvements, upgrade.sh script

This commit is contained in:
OpenXE 2022-12-14 17:12:12 +00:00
parent 817dd802aa
commit ca9b48cb58
5 changed files with 12 additions and 6 deletions

View File

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

2
upgrade/upgrade.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
sudo -u www-data php data/upgrade.php "$@"

View File

@ -15,9 +15,10 @@
<div class="col-xs-14 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Info|}</legend>
<legend>{|OpenXE Upgrade-System|}</legend>
Das Upgrade funktioniert in 2 Schritten: Dateien aktualisieren, Datenbank auffrischen. Wenn das Upgrade lange l&auml;uft, kann der Fortschritt in einem neuen Fenster mit "Anzeige auffrischen" angezeigt werden.<br><br>
Zum Start in der Konsole, im Unterordner "upgrade" diesen Befehl starten: <pre>sudo -u www-data php upgrade.php -do</pre>
Falls nach einem Abbruch oder schwerwiegenden Fehler kein Upgrade möglich ist, im Hauptordner den Ordner ".git" l&ouml;schen und das Upgrade in der Konsole erneut durchf&uuml;hren.
Dazu im Unterordner "upgrade" diesen Befehl starten: <pre>./upgrade.sh -do</pre>
</fieldset>
</div>
</div>

View File

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