1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git synced 2024-09-03 18:36:09 +02:00
This commit is contained in:
Éric Gaspar 2024-05-12 22:52:07 +02:00
parent 429adedd66
commit ec73f13e92
2 changed files with 3 additions and 29 deletions

View file

@ -116,12 +116,12 @@ popd
if [ $mypads -eq 1 ] if [ $mypads -eq 1 ]
then 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. # Add a link to Etherpad to allow anonymous pads creation from MyPads.
ynh_replace_string --match_string="^ *\"DESCRIPTION\": .*</ul>" --replace_string="&<a href=../>Pads anonymes</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/fr.json ynh_replace_string --match_string="^ *\"DESCRIPTION\": .*</ul>" --replace_string="&<a href=../>Pads anonymes</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/fr.json
ynh_replace_string --match_string="^ *\"DESCRIPTION\": .*</ul>" --replace_string="&<a href=../>Anonymous pads</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/en.json ynh_replace_string --match_string="^ *\"DESCRIPTION\": .*</ul>" --replace_string="&<a href=../>Anonymous pads</a>" --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="& | <a href='../admin'>Etherpad admin</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/en.json ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/en.json
ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/fr.json ynh_replace_string --match_string="^ *\"FOOTER\": .*2.0" --replace_string="& | <a href='../admin'>Etherpad admin</a>" --target_file=$install_dir/node_modules/ep_mypads/static/l10n/fr.json

View file

@ -8,7 +8,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression --message="Activating maintenance mode..." --weight=2 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_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 ynh_maintenance_mode_ON
@ -132,32 +132,6 @@ chown $app:$app "$install_dir/settings.json"
chmod 600 "$install_dir/credentials.json" chmod 600 "$install_dir/credentials.json"
chown $app:$app "$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 # UPGRADE NPM MODULES
#================================================= #=================================================