From 351094079f045befb9b9d12d8670d4280a21bc4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 21 May 2023 11:33:55 +0200 Subject: [PATCH] fix --- scripts/install | 10 +--------- scripts/upgrade | 29 ++--------------------------- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/scripts/install b/scripts/install index a0f6d82a..8ec0eb81 100755 --- a/scripts/install +++ b/scripts/install @@ -14,8 +14,8 @@ source /usr/share/yunohost/helpers #================================================= email=$(ynh_user_get_info --username=$admin --key=mail) -upload="256M" random_string="$(ynh_string_random --length=48)" +timezone=$(cat /etc/timezone) fpm_footprint="low" fpm_free_footprint=0 @@ -26,9 +26,6 @@ fpm_usage="low" #================================================= ynh_script_progression --message="Storing installation settings..." --weight=1 -ynh_app_setting_set --app=$app --key=database --value=$database -ynh_app_setting_set --app=$app --key=email --value=$email -ynh_app_setting_set --app=$app --key=upload --value=$upload ynh_app_setting_set --app=$app --key=random_string --value=$random_string 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 @@ -59,11 +56,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 - # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/upgrade b/scripts/upgrade index 329c0eab..8acf8ec3 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,6 +15,7 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Loading settings..." --weight=1 email=$(ynh_user_get_info --username=$admin --key=mail) +timezone=$(cat /etc/timezone) #================================================= # CHECK VERSION @@ -73,37 +74,11 @@ chmod -R 775 $install_dir/store $install_dir/cache ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SPECIFIC UPGRADE -#================================================= -# UPDATE A CONFIG FILE -#================================================= -ynh_script_progression --message="Updating a configuration file..." --weight=1 - -if [ $database = "mysql" ]; then - ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" - -ynh_add_config --template="../conf/htconfig.sample.php" --destination="$install_dir/.htconfig.php" - -# addon ldap config -ynh_script_progression --message="Push LDAP configuration to .htconfig.php..." - -cat ../conf/ldap_conf.php >> $install_dir/.htconfig.php -ynh_store_file_checksum --file=$install_dir/.htconfig.php - -chmod 600 "$install_dir/.htconfig.php" -chown $app:$app "$install_dir/.htconfig.php" - #================================================= # UPGRADE CRON JOB #=================================================