From f16f034cf9fe34b2e3a10d235482c04909ed0cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:44:37 +0200 Subject: [PATCH] cleaning --- scripts/install | 17 +++++------------ scripts/restore | 2 +- scripts/upgrade | 27 ++------------------------- 3 files changed, 8 insertions(+), 38 deletions(-) diff --git a/scripts/install b/scripts/install index 5d56d3e..fca325a 100644 --- a/scripts/install +++ b/scripts/install @@ -17,18 +17,11 @@ timezone="$(cat /etc/timezone)" redis_db=$(ynh_redis_get_free_db) email=$(ynh_user_get_info --username=$admin --key=mail) -fpm_footprint="low" -fpm_free_footprint=0 -fpm_usage="low" - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= ynh_app_setting_set --app=$app --key=redis_db --value=$redis_db -ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -40,10 +33,10 @@ ynh_setup_source --dest_dir="$install_dir" #================================================= # SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Adding system configurations related to $app ..." --weight=1 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config @@ -51,12 +44,12 @@ ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config -yunohost service add $app --description="BookStack Queue Worker" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Platform to create documentation/wiki content" --log="/var/log/$app/$app.log" #================================================= # INSTALL BOOKSTACK WITH COMPOSER #================================================= -ynh_script_progression --message="Installing BookStack with Composer..." --weight=5 +ynh_script_progression --message="Installing $app with Composer..." --weight=5 # Install composer ynh_install_composer @@ -76,7 +69,7 @@ chown $app:$app $install_dir/.env #================================================= # FINAL BOOKSTACK INSTALL #================================================= -ynh_script_progression --message="Install BookStack" --weight=5 +ynh_script_progression --message="Install $app" --weight=5 pushd $install_dir php$phpversion artisan key:generate --no-interaction --force diff --git a/scripts/restore b/scripts/restore index a2ea5e3..e77263d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -43,7 +43,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -yunohost service add $app --description="BookStack Queue Worker" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Platform to create documentation/wiki content" --log="/var/log/$app/$app.log" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index c2e49b7..d946625 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,29 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# If fpm_footprint doesn't exist, create it -if [ -z "${fpm_footprint:-}" ]; then - fpm_footprint=low - ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -fi - -# If fpm_free_footprint doesn't exist, create it -if [ -z "${fpm_free_footprint:-}" ]; then - fpm_free_footprint=0 - ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -fi - -# If fpm_usage doesn't exist, create it -if [ -z "${fpm_usage:-}" ]; then - fpm_usage=low - ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage -fi - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -46,7 +23,7 @@ ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env public/ ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config @@ -54,7 +31,7 @@ ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config -yunohost service add $app --description="BookStack Queue Worker" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Platform to create documentation/wiki content" --log="/var/log/$app/$app.log" #================================================= # INSTALL LYCHEE WITH COMPOSER