From 4c90387cc88f1917debad6e6f77a4890a9dabbf3 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sun, 9 May 2021 17:08:12 +0200 Subject: [PATCH] remove --time --- scripts/install | 3 ++- scripts/remove | 10 +++++----- scripts/restore | 15 ++++++++------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/scripts/install b/scripts/install index f52ea30..61f2b7f 100755 --- a/scripts/install +++ b/scripts/install @@ -85,7 +85,8 @@ chmod +x $final_path/indexer ynh_script_progression --message="Setting up Multimedia directory..." --weight=9 ynh_multimedia_build_main_dir -ynh_multimedia_addfolder --source_dir="$final_path/assets/cores" --dest_dir="/share/Game" +mkdir -p $final_path/assets/cores/Game +ynh_multimedia_addfolder --source_dir="$final_path/assets/cores/Game" --dest_dir="/share/Game" # SETUP CRON FILE FOR INDEXER diff --git a/scripts/remove b/scripts/remove index 97d611a..dfd3eef 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -22,7 +22,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies..." --time --weight=1 +ynh_script_progression --message="Removing dependencies..." --weight=7 # Remove metapackage and its dependencies #ynh_remove_app_dependencies @@ -42,7 +42,7 @@ ynh_secure_remove --file="/etc/cron.d/$app" #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --time --weight=1 +ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -50,7 +50,7 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." --time --weight=1 +ynh_script_progression --message="Removing nginx web server configuration..." --weight=1 # Remove the dedicated nginx config ynh_remove_nginx_config @@ -68,4 +68,4 @@ fi # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --time --last \ No newline at end of file +ynh_script_progression --message="Removal of $app completed" --last \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index 4bf24d0..4958747 100755 --- a/scripts/restore +++ b/scripts/restore @@ -36,7 +36,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." --time --weight=1 +ynh_script_progression --message="Validating restoration parameters..." --weight=1 ynh_webpath_available --domain=$domain --path_url=$path_url \ || ynh_die --message="Path not available: ${domain}${path_url}" @@ -64,7 +64,7 @@ fi #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." --time --weight=1 +ynh_script_progression --message="Restoring the app main directory..." --weight=1 ynh_restore_file --origin_path="$final_path" @@ -80,7 +80,7 @@ chown -R root: $final_path #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1 +ynh_script_progression --message="Reinstalling dependencies..." --weight=5 # Define and install dependencies #Dependencies are not really required as this is just to unzip the 7z file @@ -94,10 +94,11 @@ ynh_npm install -g coffeescript #================================================= #SETTING MULTIMEDIA DIRECTORY #================================================= -ynh_script_progression --message="Setting up Multimedia directory..." --weight=9 +ynh_script_progression --message="Setting up Multimedia directory..." --weight=5 ynh_multimedia_build_main_dir -ynh_multimedia_addfolder --source_dir="$final_path/assets/cores" --dest_dir="/share/Game" +mkdir -p $final_path/assets/cores/Game +ynh_multimedia_addfolder --source_dir="$final_path/assets/cores/Game" --dest_dir="/share/Game" #================================================= @@ -112,7 +113,7 @@ ynh_restore_file --origin_path="/etc/cron.d/$app" #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server..." --time --weight=1 +ynh_script_progression --message="Reloading nginx web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload @@ -120,4 +121,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --time --last +ynh_script_progression --message="Restoration completed for $app" --last