From e280928ce44d2b5839d326984262fc5a4ef57a81 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 29 Jun 2021 21:37:07 +0200 Subject: [PATCH] Fix --- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/install | 61 +++++++++++++++++++++++----------------------- scripts/restore | 5 ++-- scripts/upgrade | 8 +++--- 5 files changed, 40 insertions(+), 38 deletions(-) diff --git a/manifest.json b/manifest.json index 676ff4b..62110df 100644 --- a/manifest.json +++ b/manifest.json @@ -26,7 +26,7 @@ "email": "maniackc_dev@crudelis.fr" }], "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index 975949c..21e0edd 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -30,7 +30,7 @@ ep_headings2_version=0.2.30 ep_markdown_version=0.1.36 ep_page_view_version=0.5.24 ep_spellcheck_version=0.0.28 -ep_subscript_and_superscript_version=0.2.29 +ep_subscript_and_superscript_version=0.2.30 ep_table_of_contents_version=0.3.20 ep_font_size_version=0.4.23 diff --git a/scripts/install b/scripts/install index d7c344c..5d7f014 100644 --- a/scripts/install +++ b/scripts/install @@ -211,8 +211,8 @@ chmod 600 $final_path/credentials.json # Set files ownership to etherpad chmod 750 "$final_path" -chmod o-rwx $final_path -chown -R $app: $final_path +chmod o-rwx "$final_path" +chown -R $app: "$final_path" #================================================= # SETUP SYSTEMD @@ -234,35 +234,36 @@ yunohost service add $app --description="Collaborative editor" --log="/var/log/$ ynh_script_progression --message="Installing Etherpad plugins..." --weight=90 pushd "$final_path" -# Add Left/Center/Right/Justify to lines of text in a pad -ynh_npm install ep_align@${ep_align_version} >> $install_log 2>&1 -# Framapad - Adds author names to span titles -ynh_npm install ep_author_hover@${ep_author_hover_version} >> $install_log 2>&1 -# Framapad - Adds comments on sidebar and link it to the text. -ynh_npm install ep_comments_page@${ep_comments_page_version} >> $install_log 2>&1 -# Framapad - Displays paragraphs, sentences, words and characters counts. -ynh_npm install ep_countable@${ep_countable_version} >> $install_log 2>&1 -# Framapad - Delete pads which were never edited -ynh_npm install ep_delete_empty_pads@${ep_delete_empty_pads_version} >> $install_log 2>&1 -# Framapad - Apply colors to fonts -ynh_npm install ep_font_color@${ep_font_color_version} >> $install_log 2>&1 -# Framapad - Adds heading support to Etherpad Lite. -ynh_npm install ep_headings2@${ep_headings2_version} >> $install_log 2>&1 -# Framapad - Edit and Export as Markdown in Etherpad -ynh_npm install ep_markdown@${ep_markdown_version} >> $install_log 2>&1 -if [ $mypads -eq 1 ]; then - # Framapad - Groups and private pads for Etherpad - ynh_npm install ep_mypads@${mypads_version} >> $install_log 2>&1 -fi -# Framapad - Add support to do 'Spell checking' -ynh_npm install ep_spellcheck@${ep_spellcheck_version} >> $install_log 2>&1 -# Framapad - Add support for Subscript and Superscript -ynh_npm install ep_subscript_and_superscript@${ep_subscript_and_superscript_version} >> $install_log 2>&1 -# Framapad - View a table of contents for your pad -ynh_npm install ep_table_of_contents@${ep_table_of_contents_version} >> $install_log 2>&1 -# Framapad - User Pad Contents font size can be set in settings, this does not effect other peoples views -ynh_npm install ep_font_size@${ep_font_size_version} >> $install_log 2>&1 + # Add Left/Center/Right/Justify to lines of text in a pad + ynh_npm install ep_align@${ep_align_version} >> $install_log 2>&1 + # Framapad - Adds author names to span titles + ynh_npm install ep_author_hover@${ep_author_hover_version} >> $install_log 2>&1 + # Framapad - Adds comments on sidebar and link it to the text. + ynh_npm install ep_comments_page@${ep_comments_page_version} >> $install_log 2>&1 + # Framapad - Displays paragraphs, sentences, words and characters counts. + ynh_npm install ep_countable@${ep_countable_version} >> $install_log 2>&1 + # Framapad - Delete pads which were never edited + ynh_npm install ep_delete_empty_pads@${ep_delete_empty_pads_version} >> $install_log 2>&1 + # Framapad - Apply colors to fonts + ynh_npm install ep_font_color@${ep_font_color_version} >> $install_log 2>&1 + # Framapad - Adds heading support to Etherpad Lite. + ynh_npm install ep_headings2@${ep_headings2_version} >> $install_log 2>&1 + # Framapad - Edit and Export as Markdown in Etherpad + ynh_npm install ep_markdown@${ep_markdown_version} >> $install_log 2>&1 + if [ $mypads -eq 1 ]; then + # Framapad - Groups and private pads for Etherpad + ynh_npm install ep_mypads@${mypads_version} >> $install_log 2>&1 + fi + # Framapad - Add support to do 'Spell checking' + ynh_npm install ep_spellcheck@${ep_spellcheck_version} >> $install_log 2>&1 + # Framapad - Add support for Subscript and Superscript + ynh_npm install ep_subscript_and_superscript@${ep_subscript_and_superscript_version} >> $install_log 2>&1 + # Framapad - View a table of contents for your pad + ynh_npm install ep_table_of_contents@${ep_table_of_contents_version} >> $install_log 2>&1 + # Framapad - User Pad Contents font size can be set in settings, this does not effect other peoples views + ynh_npm install ep_font_size@${ep_font_size_version} >> $install_log 2>&1 popd + chown -R $app: $final_path/node_modules #================================================= diff --git a/scripts/restore b/scripts/restore index 3234f0e..5d09b62 100644 --- a/scripts/restore +++ b/scripts/restore @@ -133,8 +133,9 @@ ynh_exec_warn_less npm cache clean --force #================================================= # Restore permissions on app files -chown -R $app: $final_path -chmod o-rwx $final_path +chmod 750 "$final_path" +chmod o-rwx "$final_path" +chown -R $app: "$final_path" #================================================= # ADVERTISE SERVICE IN ADMIN PANEL diff --git a/scripts/upgrade b/scripts/upgrade index f5929d6..0a91891 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,25 +104,25 @@ fi # If overwrite_settings doesn't exist, create it if [ -z "$overwrite_settings" ]; then overwrite_settings=1 - ynh_app_setting_set $app overwrite_settings $overwrite_settings + ynh_app_setting_set --app=$app --key=overwrite_settings --value=$overwrite_settings fi # If overwrite_credentials doesn't exist, create it if [ -z "$overwrite_credentials" ]; then overwrite_credentials=1 - ynh_app_setting_set $app overwrite_credentials $overwrite_credentials + ynh_app_setting_set --app=$app --key=overwrite_credentials --value=$overwrite_credentials fi # If overwrite_nginx doesn't exist, create it if [ -z "$overwrite_nginx" ]; then overwrite_nginx=1 - ynh_app_setting_set $app overwrite_nginx $overwrite_nginx + ynh_app_setting_set --app=$app --key=overwrite_nginx --value=$overwrite_nginx fi # If overwrite_systemd doesn't exist, create it if [ -z "$overwrite_systemd" ]; then overwrite_systemd=1 - ynh_app_setting_set $app overwrite_systemd $overwrite_systemd + ynh_app_setting_set --app=$app --key=overwrite_systemd --value=$overwrite_systemd fi # Cleaning legacy permissions