From ec73f13e929ad1900c1298eae2e8e40b83c6c8f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?E=CC=81ric=20Gaspar?=
<46165813+ericgaspar@users.noreply.github.com>
Date: Sun, 12 May 2024 22:52:07 +0200
Subject: [PATCH] cleaning
---
scripts/install | 4 ++--
scripts/upgrade | 28 +---------------------------
2 files changed, 3 insertions(+), 29 deletions(-)
diff --git a/scripts/install b/scripts/install
index 3e0ec33..274dda4 100644
--- a/scripts/install
+++ b/scripts/install
@@ -116,12 +116,12 @@ popd
if [ $mypads -eq 1 ]
then
- ynh_script_progression --message="Tweaking MyPad configuration..." --weight=1
+ ynh_script_progression --message="Tweaking MyPads configuration..." --weight=1
# Add a link to Etherpad to allow anonymous pads creation from MyPads.
ynh_replace_string --match_string="^ *\"DESCRIPTION\": .*" --replace_string="&Pads anonymes" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/fr.json
ynh_replace_string --match_string="^ *\"DESCRIPTION\": .*" --replace_string="&Anonymous pads" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/en.json
- # And a link to etherpad admin from Mypads.
+ # And a link to Etherpad admin from MyPads.
ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | Etherpad admin" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/en.json
ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | Etherpad admin" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/fr.json
diff --git a/scripts/upgrade b/scripts/upgrade
index 98f9f4e..9dbdded 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -8,7 +8,7 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Activating maintenance mode..." --weight=2
-# Wait for etherpad to be fully started # (... but why ???)
+# Wait for Etherpad to be fully started # (... but why ???)
ynh_systemd_action --action=restart --line_match="You can access your Etherpad instance at" --log_path="/var/log/$app/etherpad.log" --timeout="120"
ynh_maintenance_mode_ON
@@ -132,32 +132,6 @@ chown $app:$app "$install_dir/settings.json"
chmod 600 "$install_dir/credentials.json"
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~ynh3
-#then
-# pushd "$install_dir"
-# 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=2
-# ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm uninstall ep_table_of_contents
-# fi
-# popd
-#fi
-
-#ynh_script_progression --message="Installing Etherpad plugins..." --weight=10
-
-#pushd "$install_dir"
-# ynh_exec_warn_less npm install pnpm -g
-# ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run install-plugins ep_align@${ep_align_version} ep_author_hover@${ep_author_hover_version} ep_comments_page@${ep_comments_page_version} ep_countable@${ep_countable_version} ep_delete_empty_pads@${ep_delete_empty_pads_version} ep_font_color@${ep_font_color_version} ep_headings2@${ep_headings2_version} ep_markdown@${ep_markdown_version} ep_spellcheck@${ep_spellcheck_version} ep_subscript_and_superscript@${ep_subscript_and_superscript_version} ep_font_size@${ep_font_size_version}
-# if [ $mypads -eq 1 ]; then
-# ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH pnpm run install-plugins ep_mypads@${mypads_version}
-# fi
-#popd
-
#=================================================
# UPGRADE NPM MODULES
#=================================================