mirror of
https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git
synced 2024-09-03 18:36:09 +02:00
Fix
This commit is contained in:
parent
564c33c217
commit
8a05956b81
3 changed files with 6 additions and 12 deletions
|
@ -17,7 +17,7 @@ mypads_version=1.7.19
|
|||
ep_align_version=0.3.31
|
||||
ep_author_hover_version=0.3.17
|
||||
ep_automatic_logut_version=1.0.8
|
||||
ep_comments_page_version=0.1.58
|
||||
ep_comments_page_version=0.1.59
|
||||
ep_countable_version=0.0.9
|
||||
ep_delete_empty_pads_version=0.0.7
|
||||
ep_font_color_version=0.0.40
|
||||
|
|
|
@ -132,12 +132,8 @@ show_config() {
|
|||
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_ALWAYSSHOWCHAT=$pad_config_alwaysshowchat"
|
||||
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_SHOW_MARKDOWN=$pad_config_show_markdown"
|
||||
ynh_return "YNH_CONFIG_MAIN_PAD_CONFIGURATION_PAD_CONFIG_AUTOMATIC_LOGOUT=$pad_config_automatic_logout"
|
||||
|
||||
ynh_return "YNH_CONFIG_MAIN_MYPADS_CONFIGURATION_MYPADS=$mypads"
|
||||
ynh_return "YNH_CONFIG_MAIN_MYPADS_CONFIGURATION_USELDAP=$useldap"
|
||||
|
||||
#ynh_return "YNH_CONFIG_MAIN_IS_PUBLIC_IS_PUBLIC=$is_public"
|
||||
|
||||
ynh_return "YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_SETTINGS=$overwrite_settings"
|
||||
ynh_return "YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_CREDENTIALS=$overwrite_credentials"
|
||||
ynh_return "YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_NGINX=$overwrite_nginx"
|
||||
|
@ -201,16 +197,15 @@ apply_config() {
|
|||
if [ "$pad_config_automatic_logout" != "$old_pad_config_automatic_logout" ]
|
||||
then
|
||||
ynh_use_nodejs
|
||||
chown -R $app: $final_path
|
||||
pushd "$final_path/src"
|
||||
ynh_secure_remove --file="$final_path/src/package-lock.json" #added to fix saveError ENOENT: no such file or directory
|
||||
if [ "$pad_config_automatic_logout" = "0" ]
|
||||
then
|
||||
ynh_replace_string --match_string="^\(.*\"automatic_logut.*$\)" --replace_string="\/\/\1" --target_file="$config_file"
|
||||
npm uninstall ep_automatic_logut
|
||||
ynh_exec_as $app env "$ynh_node_load_PATH" npm uninstall ep_automatic_logut
|
||||
else
|
||||
ynh_replace_string --match_string="^\/\/\(.*\"automatic_logut.*$\)" --replace_string="\1" --target_file="$config_file"
|
||||
npm install ep_automatic_logut@${ep_automatic_logut_version}
|
||||
ynh_exec_as $app env "$ynh_node_load_PATH" npm install ep_automatic_logut@${ep_automatic_logut_version}
|
||||
fi
|
||||
popd
|
||||
chown -R $app: $final_path/node_modules
|
||||
|
@ -252,14 +247,13 @@ apply_config() {
|
|||
if [ "$mypads" != "$old_mypads" ]
|
||||
then
|
||||
ynh_use_nodejs
|
||||
chown -R $app: $final_path
|
||||
pushd "$final_path/src"
|
||||
ynh_secure_remove --file="$final_path/src/package-lock.json" #added to fix saveError ENOENT: no such file or directory
|
||||
if [ "$mypads" = "1" ]
|
||||
then
|
||||
npm install ep_mypads@${mypads_version}
|
||||
ynh_exec_as $app env "$ynh_node_load_PATH" npm install ep_mypads@${mypads_version}
|
||||
else
|
||||
npm uninstall ep_mypads
|
||||
ynh_exec_as $app env "$ynh_node_load_PATH" npm uninstall ep_mypads
|
||||
fi
|
||||
popd
|
||||
chown -R $app: $final_path/node_modules
|
||||
|
|
|
@ -336,8 +336,8 @@ fi
|
|||
|
||||
# Set files ownership to etherpad
|
||||
chown -R $app: $final_path
|
||||
chmod 600 "$final_path/credentials.json"
|
||||
# Restrict access to credentials.json
|
||||
chmod 600 "$final_path/credentials.json"
|
||||
chown $app -R /var/log/$app/etherpad.log
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue