From ca9b48cb585b1417133307c7b5e761477b9f9f47 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Wed, 14 Dec 2022 17:12:12 +0000 Subject: [PATCH] upgrade some usability improvements, upgrade.sh script --- upgrade/UPGRADE.md | 9 ++++++--- upgrade/{ => data}/upgrade.php | 0 upgrade/upgrade.sh | 2 ++ www/pages/content/upgrade.tpl | 5 +++-- www/pages/upgrade.php | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) rename upgrade/{ => data}/upgrade.php (100%) create mode 100644 upgrade/upgrade.sh 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 @@