From 7648a0d698c1d01d8dc97093fcdf5b7c883f1f53 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 22 May 2022 22:49:15 +0200 Subject: [PATCH] postinstall --- doc/DISCLAIMER.md | 10 +++++++++- scripts/install | 16 +++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 211dce6..a71965e 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1 +1,9 @@ -Database credentials are sent by mail for the post installation. `http://example.org/tiki-install.php` \ No newline at end of file +### Postinstall + +Database credentials are sent by mail for the post installation. `http://example.org/tiki-install.php` + +### Storing your uploaded files + +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/tiki`. You will be able to migrate your currently uploaded files from one to the other. \ No newline at end of file diff --git a/scripts/install b/scripts/install index b2d4f76..8a813a4 100755 --- a/scripts/install +++ b/scripts/install @@ -104,6 +104,20 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# CREATE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Creating a data directory..." --time --weight=1 + +datadir=/home/yunohost.app/$app +ynh_app_setting_set --app=$app --key=datadir --value=$datadir + +mkdir -p $datadir + +chmod 750 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" + #================================================= # ADD A CONFIGURATION #================================================= @@ -148,8 +162,8 @@ Please open your $app domain: https://$domain$path_url Complete the registration process from the setup page displayed. Details for MySQL database to be enterted while registration process: -Database login: $app Database name: $app +Database userame: $app Database password: $db_pwd If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/tiki_ynh/issues"