1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_ynh.git synced 2024-09-03 18:36:10 +02:00
This commit is contained in:
ericgaspar 2021-02-26 09:34:20 +01:00
parent 1ed1852fcd
commit 4f845f545d
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 16 additions and 20 deletions

View file

@ -32,7 +32,7 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f
## Documentation
* Official documentation: http://etherpad.org/doc/v1.8.7
* Official documentation: http://etherpad.org/doc/v1.8.10
* YunoHost documentation: https://yunohost.org/#/app_etherpad
## YunoHost specific features

View file

@ -32,7 +32,7 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain
## Documentation
* Documentation officielle : http://etherpad.org/doc/v1.8.7
* Documentation officielle : http://etherpad.org/doc/v1.8.10
* Documentation YunoHost : https://yunohost.org/#/app_etherpad
## Fonctionnalités spécifiques à YunoHost

View file

@ -535,9 +535,7 @@
*/
"logconfig" :
{ "appenders": [
{ "type": "console"
//, "category": "access"// only logs pad access
}
{ "type": "console"}
/*
, { "type": "file"
@ -577,10 +575,11 @@
*/
]
}, // logconfig
},
/* Override any strings found in locale directories */
"customLocaleStrings": {},
/* Disable Admin UI tests */
"enableAdminUITests": false
"enableAdminUITests": false
}

View file

@ -13,7 +13,7 @@
"name": "eric_G"
},
"requirements": {
"yunohost": ">= 4.1.3"
"yunohost": ">= 4.1.7"
},
"multi_instance": true,
"services": [

View file

@ -52,7 +52,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=language --value=$language
ynh_app_setting_set --app=$app --key=password --value=$password
ynh_app_setting_set --app=$app --key=export --value=$export
@ -94,12 +93,11 @@ ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_script_progression --message="Creating a PostgreSQL database..." --weight=5
db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_psql_test_if_first_run
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -107,7 +105,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# 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
#=================================================
# NGINX CONFIGURATION
@ -132,7 +130,7 @@ ynh_script_progression --message="Installing Etherpad..." --weight=60
chown -R $app: $final_path
pushd "$final_path" || ynh_die
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_delete_empty_pads ep_subscript_and_superscript ep_headings2 ep_author_hover ep_markdown ep_comments_page ep_align ep_font_color ep_embedded_hyperlinks2
@ -160,15 +158,9 @@ then
# 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"
#=================================================
# STORE THE CONFIG FILE CHECKSUM
#=================================================
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$final_path/settings.json"
ynh_store_file_checksum --file="$final_path/credentials.json"
#=================================================

View file

@ -147,6 +147,8 @@ popd || ynh_die
#=================================================
ynh_script_progression --message="Reconfiguring Etherpad..." --weight=6
ynh_backup_if_checksum_is_different --file="$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"
@ -164,8 +166,11 @@ then
# 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_backup_if_checksum_is_different --file="$final_path/credentials.json"
ynh_add_config --template="../conf/credentials.json" --destination="$final_path/credentials.json"
ynh_store_file_checksum --file="$final_path/credentials.json"
#=================================================
# GENERIC FINALIZATION