From 495c049036a0e7be55b29406beabf5f66c43cc24 Mon Sep 17 00:00:00 2001 From: Jyhem Date: Tue, 6 Jun 2023 20:53:53 +0200 Subject: [PATCH 1/6] [FIX] Fix ADMIN.md message and preset the default database storage folder --- doc/ADMIN.md | 3 ++- scripts/install | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 34a2854..0a46827 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -2,4 +2,5 @@ To ease the install process and first access, Tiki saves your uploaded files (office documents, images, pdf, etc. attached to wiki pages, forum posts, tracker items, file galleries...) by default in its database. This works perfectly in most cases but it is not the recommended setup if you need to save many thousands of files or more. -In that case, consider switching from "Store to database" to "Store to directory", which you will find in the Configuration Wizard. Please use this preset path directory: `/home/yunohost.app/$app`. You will be able to migrate your currently uploaded files from one to the other. +In that case, consider switching from "Store to database" to "Store to directory", which you will find in the Configuration Wizard. Please use the preset path directory: `/home/yunohost.app/tiki<…>`. You will be able to migrate your currently uploaded files from one to the other. + diff --git a/scripts/install b/scripts/install index 0b3d841..d281e15 100755 --- a/scripts/install +++ b/scripts/install @@ -71,6 +71,10 @@ exec_as_app console.php database:configure "$app" "$db_pwd" "$app" # Create database contents exec_as_app console.php database:install +# Set default database directory +FGALDIR=/home/yunohost.app/$app +exec_as_app sed -i -e "s#storage\/fgal#$FGALDIR#" lib/prefs/fgal.php + # Lock installer exec_as_app console.php installer:lock @@ -78,7 +82,10 @@ exec_as_app console.php installer:lock exec_as_app console.php index:rebuild # Set on Long Term Support versions -exec_as_app console.php preferences:set tiki_release_cycle longterm +if [[ "$release_cycle" == "longterm" ]] +then + exec_as_app console.php preferences:set tiki_release_cycle longterm +fi #================================================= # END OF SCRIPT From e1800bb729734ec5d7e9f56255e071cf667ad010 Mon Sep 17 00:00:00 2001 From: Jyhem Date: Tue, 6 Jun 2023 21:17:10 +0200 Subject: [PATCH 2/6] [FIX] Fix bug in using sed in install script --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index d281e15..03dcfe7 100755 --- a/scripts/install +++ b/scripts/install @@ -73,7 +73,7 @@ exec_as_app console.php database:install # Set default database directory FGALDIR=/home/yunohost.app/$app -exec_as_app sed -i -e "s#storage\/fgal#$FGALDIR#" lib/prefs/fgal.php +sed -i -e "s#storage\/fgal#$FGALDIR#" lib/prefs/fgal.php # Lock installer exec_as_app console.php installer:lock From 93d2daac6aa8f5cd5c4ad3fad2ca2ca6a100d40d Mon Sep 17 00:00:00 2001 From: Jyhem Date: Tue, 6 Jun 2023 21:31:30 +0200 Subject: [PATCH 3/6] [FIX] Fix bug in using sed in install script 2 --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 03dcfe7..2cc6552 100755 --- a/scripts/install +++ b/scripts/install @@ -73,6 +73,7 @@ exec_as_app console.php database:install # Set default database directory FGALDIR=/home/yunohost.app/$app +cd "$install_dir" sed -i -e "s#storage\/fgal#$FGALDIR#" lib/prefs/fgal.php # Lock installer From f46e500b1998f220c613738b0edcecccf43fa81b Mon Sep 17 00:00:00 2001 From: tiki-jyhem Date: Fri, 9 Jun 2023 22:22:36 +0200 Subject: [PATCH 4/6] Update doc/ADMIN.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> --- doc/ADMIN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 0a46827..7a8a5f3 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -2,5 +2,5 @@ To ease the install process and first access, Tiki saves your uploaded files (office documents, images, pdf, etc. attached to wiki pages, forum posts, tracker items, file galleries...) by default in its database. This works perfectly in most cases but it is not the recommended setup if you need to save many thousands of files or more. -In that case, consider switching from "Store to database" to "Store to directory", which you will find in the Configuration Wizard. Please use the preset path directory: `/home/yunohost.app/tiki<…>`. You will be able to migrate your currently uploaded files from one to the other. +In that case, consider switching from "Store to database" to "Store to directory", which you will find in the Configuration Wizard. Please use the preset path directory: `__DATA_DIR__`. You will be able to migrate your currently uploaded files from one to the other. From 084e1bf79ffbbea21ae5c4e8d1d4c062861ce1f0 Mon Sep 17 00:00:00 2001 From: tiki-jyhem Date: Fri, 9 Jun 2023 22:32:17 +0200 Subject: [PATCH 5/6] Update scripts/install Co-authored-by: Alexandre Aubin --- scripts/install | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 2cc6552..d395a84 100755 --- a/scripts/install +++ b/scripts/install @@ -72,10 +72,8 @@ exec_as_app console.php database:configure "$app" "$db_pwd" "$app" exec_as_app console.php database:install # Set default database directory -FGALDIR=/home/yunohost.app/$app cd "$install_dir" -sed -i -e "s#storage\/fgal#$FGALDIR#" lib/prefs/fgal.php - +sed -i -e "s#storage\/fgal#$data_dir#" lib/prefs/fgal.php # Lock installer exec_as_app console.php installer:lock From e209e558d14a6a21cbbf9916f54351a3f0974271 Mon Sep 17 00:00:00 2001 From: Jyhem Date: Fri, 9 Jun 2023 22:34:03 +0200 Subject: [PATCH 6/6] [ENH] This \ was useless --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index d395a84..e179a35 100755 --- a/scripts/install +++ b/scripts/install @@ -73,7 +73,7 @@ exec_as_app console.php database:install # Set default database directory cd "$install_dir" -sed -i -e "s#storage\/fgal#$data_dir#" lib/prefs/fgal.php +sed -i -e "s#storage/fgal#$data_dir#" lib/prefs/fgal.php # Lock installer exec_as_app console.php installer:lock