From 1e67c5ed31bcbbc52bef214e29c55d9c746f5036 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 11 Dec 2023 09:13:12 +0100 Subject: [PATCH] Add explicit removal of ep_table_of_contents when upgrading from a version older than 1.9.1~ynh2 --- scripts/upgrade | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 187bd76..d58741f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -143,6 +143,14 @@ chown $app:$app "$install_dir/credentials.json" # INSTALL ETHERPAD'S PLUGINS #================================================= +# If upgrading from an old version and table of content is there, remove it +if ynh_compare_current_package_version --comparison lt --version 1.9.1~ynh2 + if ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm ls 2>/dev/null | grep -q ep_table_of_contents + then + ynh_script_progression --message="Uninstalling ep_table_of_contents..." --weight=90 + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm uninstall ep_table_of_contents + fi +then ynh_script_progression --message="Installing Etherpad plugins..." --weight=90