mirror of
https://github.com/YunoHost-Apps/etherpad_ynh.git
synced 2024-09-03 18:36:10 +02:00
Fix
This commit is contained in:
parent
acf948da51
commit
96e65197c5
4 changed files with 31 additions and 31 deletions
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
path="/path" (PATH)
|
path="/path"
|
||||||
admin="john" (USER)
|
admin="john"
|
||||||
language="fr"
|
language="fr"
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1
|
||||||
password="pass"
|
password="pass"
|
||||||
port="9001" (PORT)
|
port="9001"
|
||||||
export="libreoffice"
|
export="libreoffice"
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"name": "eric_G"
|
"name": "eric_G"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.0"
|
"yunohost": ">= 4.2.4"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -128,7 +128,7 @@ chown -R $app: $final_path
|
||||||
pushd $final_path || ynh_die
|
pushd $final_path || ynh_die
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_as $app env "$ynh_node_load_PATH" bin/installDeps.sh
|
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
|
popd || ynh_die
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -174,7 +174,7 @@ chmod 600 $final_path/credentials.json
|
||||||
ynh_script_progression --message="Configuring a systemd service..." --weight=4
|
ynh_script_progression --message="Configuring a systemd service..." --weight=4
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config --others_var="ynh_node_load_PATH"
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
|
|
|
@ -108,7 +108,7 @@ then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# 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
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -146,36 +146,36 @@ chown -R $app: $final_path
|
||||||
pushd "$final_path" || ynh_die
|
pushd "$final_path" || ynh_die
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH bin/installDeps.sh
|
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
|
popd || ynh_die
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# 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="__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"
|
# ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/settings.json"
|
||||||
if [ "$export" = "abiword" ]
|
# if [ "$export" = "abiword" ]
|
||||||
then
|
# then
|
||||||
# Get AbiWord binary path
|
# # Get AbiWord binary path
|
||||||
abiword_path=`which abiword`
|
# abiword_path=`which abiword`
|
||||||
# Set the path of AbiWord into Etherpad config
|
# # 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"
|
# ynh_replace_string --match_string="\"abiword\" : null" --replace_string="\"abiword\" : \"$abiword_path\"" --target_file="$final_path/settings.json"
|
||||||
elif [ "$export" = "libreoffice" ]
|
# elif [ "$export" = "libreoffice" ]
|
||||||
then
|
# then
|
||||||
# Get soffice binary path
|
# # Get soffice binary path
|
||||||
soffice_path=`which soffice`
|
# soffice_path=`which soffice`
|
||||||
# Set the path of soffice into Etherpad config
|
# # 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"
|
# ynh_replace_string --match_string="\"soffice\" : null" --replace_string="\"soffice\" : \"$soffice_path\"" --target_file="$final_path/settings.json"
|
||||||
fi
|
# fi
|
||||||
ynh_store_file_checksum --file="$final_path/settings.json"
|
# 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
|
# GENERIC FINALIZATION
|
||||||
|
@ -194,7 +194,7 @@ chmod 600 $final_path/credentials.json
|
||||||
ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
|
ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config --others_var="ynh_node_load_PATH"
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
|
|
Loading…
Add table
Reference in a new issue