From 7866b7d3eeb9f503ed95c39b21dbe7ea7b6016dd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 17 Jul 2021 12:32:05 +0200 Subject: [PATCH] Fix --- scripts/install | 5 +++-- scripts/remove | 3 +-- scripts/restore | 1 + scripts/upgrade | 5 ----- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index b35fb4b..8f05f4c 100755 --- a/scripts/install +++ b/scripts/install @@ -60,7 +60,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # CREATE A MYSQL DATABASE #================================================= -ynh_script_progression --message="Creating a MySQL database..." --weight=1 +ynh_script_progression --message="Creating a MySQL database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) db_user=$db_name @@ -70,7 +70,7 @@ ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=1 +ynh_script_progression --message="Setting up source files..." --weight=3 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src @@ -100,6 +100,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # MODIFY A CONFIG FILE #================================================= +ynh_script_progression --message="Setuping a configuration file..." --weight=1 ynh_add_config --template="../conf/config.php.sample" --destination="$final_path/config.php" chmod 400 "$final_path/config.php" diff --git a/scripts/remove b/scripts/remove index 746c83b..7dbae82 100755 --- a/scripts/remove +++ b/scripts/remove @@ -56,9 +56,8 @@ ynh_remove_fpm_config #================================================= # REMOVE THE CRON FILE #================================================= +ynh_script_progression --message="Removing cron file..." --weight=1 -# Remove a cron file -# TODO: Ensure that cron job is not running (How !?) ynh_secure_remove --file="/etc/cron.d/$app" #================================================= diff --git a/scripts/restore b/scripts/restore index bca14e3..2f15da0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -50,6 +50,7 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index 9978e30..70f6903 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -26,11 +26,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================