diff --git a/scripts/_variables b/scripts/_variables index 063a5f7..e7b1ac2 100644 --- a/scripts/_variables +++ b/scripts/_variables @@ -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 diff --git a/scripts/config b/scripts/config index d75ba13..d814acc 100644 --- a/scripts/config +++ b/scripts/config @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 555a088..56b7d19 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #=================================================