diff --git a/scripts/install b/scripts/install index 58e7398..781dfb5 100755 --- a/scripts/install +++ b/scripts/install @@ -37,7 +37,6 @@ ynh_script_progression --message="Validating installation parameters..." --weigh # Set variable path_url="/SOGo" -# final_path="/opt/yunohost/$app" # Register (book) web path ynh_webpath_register --app $app --domain $domain --path_url $path_url diff --git a/scripts/remove b/scripts/remove index a0845a3..98d1b55 100755 --- a/scripts/remove +++ b/scripts/remove @@ -59,14 +59,6 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=1 # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name -#================================================= -# REMOVE APP MAIN DIR -#================================================= -ynh_script_progression --message="Removing app main directory..." --weight=1 - -# Remove the app directory securely -ynh_secure_remove --file="$final_path" - #================================================= # REMOVE NGINX CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index e2f5cd8..237e35a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -35,11 +35,11 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name #================================================= -# CHECK IF THE APP CAN BE RESTORED +# RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=1 +ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # REINSTALL DEPENDENCIES @@ -107,5 +107,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= - ynh_script_progression --message="Restoration completed for $app" --last