From 96e65197c54f5dffe6e09d947968f32c464144d7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 15 May 2021 19:43:37 +0200 Subject: [PATCH] Fix --- check_process | 10 +++++----- manifest.json | 2 +- scripts/install | 4 ++-- scripts/upgrade | 46 +++++++++++++++++++++++----------------------- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/check_process b/check_process index 2cae47d..53ebd8b 100644 --- a/check_process +++ b/check_process @@ -5,13 +5,13 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) + domain="domain.tld" + path="/path" + admin="john" language="fr" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 password="pass" - port="9001" (PORT) + port="9001" export="libreoffice" ; Checks pkg_linter=1 diff --git a/manifest.json b/manifest.json index 8ce994f..f6bccaf 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index f6bc983..b049156 100644 --- a/scripts/install +++ b/scripts/install @@ -128,7 +128,7 @@ chown -R $app: $final_path pushd $final_path || ynh_die ynh_use_nodejs ynh_exec_as $app env "$ynh_node_load_PATH" bin/installDeps.sh - ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install ep_spellcheck ep_countable ep_delete_empty_pads ep_subscript_and_superscript ep_headings2 ep_author_hover ep_markdown ep_comments_page ep_align ep_font_color + # ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install ep_spellcheck ep_countable ep_delete_empty_pads ep_subscript_and_superscript ep_headings2 ep_author_hover ep_markdown ep_comments_page ep_align ep_font_color popd || ynh_die #================================================= @@ -174,7 +174,7 @@ chmod 600 $final_path/credentials.json ynh_script_progression --message="Configuring a systemd service..." --weight=4 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="ynh_node_load_PATH" +ynh_add_systemd_config #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/upgrade b/scripts/upgrade index 82b0bd8..d0e9114 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -108,7 +108,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/settings.json $final_path/credentials.json" fi #================================================= @@ -146,36 +146,36 @@ chown -R $app: $final_path pushd "$final_path" || ynh_die ynh_use_nodejs ynh_exec_as $app env $ynh_node_load_PATH bin/installDeps.sh - ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install ep_spellcheck ep_countable ep_delete_empty_pads ep_subscript_and_superscript ep_headings2 ep_author_hover ep_markdown ep_comments_page ep_align ep_font_color + # ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install ep_spellcheck ep_countable ep_delete_empty_pads ep_subscript_and_superscript ep_headings2 ep_author_hover ep_markdown ep_comments_page ep_align ep_font_color popd || ynh_die #================================================= # MODIFY A CONFIG FILE #================================================= -ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 +# ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6 -ynh_backup_if_checksum_is_different --file="$final_path/settings.json" +# ynh_backup_if_checksum_is_different --file="$final_path/settings.json" -cp ../conf/settings.json $final_path/settings.json +# cp ../conf/settings.json $final_path/settings.json -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/settings.json" -ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json" -if [ "$export" = "abiword" ] -then - # Get AbiWord binary path - abiword_path=`which abiword` - # Set the path of AbiWord into Etherpad config - ynh_replace_string --match_string="\"abiword\" : null" --replace_string="\"abiword\" : \"$abiword_path\"" --target_file="$final_path/settings.json" -elif [ "$export" = "libreoffice" ] -then - # Get soffice binary path - soffice_path=`which soffice` - # Set the path of soffice into Etherpad config - ynh_replace_string --match_string="\"soffice\" : null" --replace_string="\"soffice\" : \"$soffice_path\"" --target_file="$final_path/settings.json" -fi -ynh_store_file_checksum --file="$final_path/settings.json" +# ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/settings.json" +# ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json" +# if [ "$export" = "abiword" ] +# then +# # Get AbiWord binary path +# abiword_path=`which abiword` +# # Set the path of AbiWord into Etherpad config +# ynh_replace_string --match_string="\"abiword\" : null" --replace_string="\"abiword\" : \"$abiword_path\"" --target_file="$final_path/settings.json" +# elif [ "$export" = "libreoffice" ] +# then +# # Get soffice binary path +# soffice_path=`which soffice` +# # Set the path of soffice into Etherpad config +# ynh_replace_string --match_string="\"soffice\" : null" --replace_string="\"soffice\" : \"$soffice_path\"" --target_file="$final_path/settings.json" +# fi +# ynh_store_file_checksum --file="$final_path/settings.json" -ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" +# ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json" #================================================= # GENERIC FINALIZATION @@ -194,7 +194,7 @@ chmod 600 $final_path/credentials.json ynh_script_progression --message="Upgrading systemd configuration..." --weight=2 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="ynh_node_load_PATH" +ynh_add_systemd_config #================================================= # INTEGRATE SERVICE IN YUNOHOST