From daae1ab0fbafc14ea1179365b54df07321546b48 Mon Sep 17 00:00:00 2001 From: Jyhem Date: Tue, 21 Feb 2023 21:51:30 +0100 Subject: [PATCH 1/2] Installation completes. Tiki installer is skipped. No mail needs to be sent to admin. --- doc/DISCLAIMER.md | 7 +++++-- scripts/install | 47 +++++++++++++++++++---------------------------- 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index a71965e..a3b2d3a 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,9 +1,12 @@ ### Postinstall -Database credentials are sent by mail for the post installation. `http://example.org/tiki-install.php` +You can log in using the special `admin` username and the `admin` password. You will be asked to change the password immediately after login. ### 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 +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. + + +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" diff --git a/scripts/install b/scripts/install index 33cf333..c401c26 100755 --- a/scripts/install +++ b/scripts/install @@ -119,18 +119,29 @@ chmod -R o-rwx "$datadir" chown -R $app:www-data "$datadir" #================================================= -# ADD A CONFIGURATION +# ADD INITIAL CONFIGURATION #================================================= -# ynh_script_progression --message="Adding a configuration file..." --time --weight=1 -# ynh_add_config --template="../conf/local.php" --destination="$final_path/db/local.php" +# Define a function to execute commands with proper permissions +exec_as_app() { + (cd "$final_path" && ynh_exec_as "$app" \ + php${phpversion} --define apc.enable_cli=1 --no-interaction --no-ansi "$@") +} -# chmod 400 "$final_path/db/local.php" -# chown $app:$app "$final_path/db/local.php" +ynh_script_progression --message="Create database configuration file..." --time --weight=1 +exec_as_app console.php database:configure "$app" "$db_pwd" "$app" -# pushd $final_path -# php$phpversion console.php database:install -# popd +ynh_script_progression --message="Create database contents..." --time --weight=1 +exec_as_app console.php database:install + +ynh_script_progression --message="Lock installer..." --time --weight=1 +exec_as_app console.php installer:lock + +ynh_script_progression --message="Create data index..." --time --weight=1 +exec_as_app console.php index:rebuild + +ynh_script_progression --message="Set on Long Term Support versions..." --time --weight=1 +exec_as_app console.php preferences:set tiki_release_cycle longterm #================================================= # SETUP SSOWAT @@ -150,26 +161,6 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload -#================================================= -# SEND A README FOR THE ADMIN -#================================================= -ynh_script_progression --message="Sending a readme for the admin..." --weight=1 - -message="Tiki was successfully installed :) - -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 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" - -ynh_send_readme_to_admin "$message" - #================================================= # END OF SCRIPT #================================================= From 9bf9539a52e63f953b13f9263721f25a7e8a8ec1 Mon Sep 17 00:00:00 2001 From: Jyhem Date: Wed, 22 Feb 2023 01:44:05 +0100 Subject: [PATCH 2/2] Remove faulty options --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c401c26..95e5256 100755 --- a/scripts/install +++ b/scripts/install @@ -125,7 +125,7 @@ chown -R $app:www-data "$datadir" # Define a function to execute commands with proper permissions exec_as_app() { (cd "$final_path" && ynh_exec_as "$app" \ - php${phpversion} --define apc.enable_cli=1 --no-interaction --no-ansi "$@") + php${phpversion} --define apc.enable_cli=1 "$@") } ynh_script_progression --message="Create database configuration file..." --time --weight=1