From f57b6f49354814449a8590fdee759124e72897f5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Mar 2021 11:30:11 +0100 Subject: [PATCH] Fix --- actions.toml | 15 --------------- check_process | 1 - config_panel.toml | 12 +----------- scripts/config | 23 ++--------------------- 4 files changed, 3 insertions(+), 48 deletions(-) diff --git a/actions.toml b/actions.toml index 75b4cf9..e80eab8 100644 --- a/actions.toml +++ b/actions.toml @@ -33,18 +33,3 @@ command = "/bin/bash scripts/actions/reset_default_config \"settings.json\"" # accepted_return_codes = [0, 1, 2, 3] # optional accepted_return_codes = [0] description = "Reset the config file settings.json." - -# [public_private] -# name = "Move to public or private" -# command = "/bin/bash scripts/actions/public_private" -# # user = "root" # optional -# # cwd = "/" # optional -# # accepted_return_codes = [0, 1, 2, 3] # optional -# accepted_return_codes = [0] -# description = "Change the public access of the app." - -# [public_private.arguments] -# [public_private.arguments.is_public] -# type = "boolean" -# ask = "Is it a public app?" -# default = true diff --git a/check_process b/check_process index 9e83d55..85976fe 100644 --- a/check_process +++ b/check_process @@ -21,7 +21,6 @@ main.pad_configuration.pad_config_automatic_logout=0|1 main.mypads_configuration.mypads=0|1 main.mypads_configuration.useldap=0|1 - #main.is_public.is_public=1|0 main.overwrite_files.overwrite_settings=0|1 main.overwrite_files.overwrite_credentials=0|1 main.overwrite_files.overwrite_nginx=0|1 diff --git a/config_panel.toml b/config_panel.toml index 2a5dd93..631ba72 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -49,7 +49,7 @@ name = "Etherpad configuration" [main.mypads_configuration] - name = "Mypads configuration" + name = "MyPads configuration" [main.mypads_configuration.mypads] ask = "Enable MyPads plugin?" @@ -62,16 +62,6 @@ name = "Etherpad configuration" default = true - # [main.is_public] - # name = "Public access" - - # [main.is_public.is_public] - # ask = "Is it a public website?" - # type = "boolean" - # default = true - # help = "If your Etherpad instance is public, everyone will be able to create a pad or see an existing one." - - [main.overwrite_files] name = "Overwriting config files during an upgrade" diff --git a/scripts/config b/scripts/config index 4d4f02c..44e0926 100644 --- a/scripts/config +++ b/scripts/config @@ -100,10 +100,6 @@ else fi useldap="${YNH_CONFIG_MAIN_MYPADS_CONFIGURATION_USELDAP:-$old_useldap}" -# # is_public -# old_is_public="$(ynh_app_setting_get --app=$app --key=is_public)" -# is_public="${YNH_CONFIG_MAIN_IS_PUBLIC_IS_PUBLIC:-$old_is_public}" - # Overwrite settings.json file old_overwrite_settings="$(ynh_app_setting_get --app=$app --key=overwrite_settings)" overwrite_settings="${YNH_CONFIG_MAIN_OVERWRITE_FILES_OVERWRITE_SETTINGS:-$old_overwrite_settings}" @@ -205,7 +201,7 @@ apply_config() { if [ "$pad_config_automatic_logout" != "$old_pad_config_automatic_logout" ] then ynh_use_nodejs - pushd "$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 @@ -255,7 +251,7 @@ apply_config() { if [ "$mypads" != "$old_mypads" ] then ynh_use_nodejs - pushd "$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 @@ -293,21 +289,6 @@ apply_config() { ynh_systemd_action --action=restart --line_match="You can access your Etherpad instance at" --log_path="/var/log/$app/etherpad.log" --timeout="120" fi - #================================================= - # MODIFY PUBLIC ACCESSIBILITY - #================================================= - - # # Change public accessibility - # if [ "$is_public" != "$old_is_public" ] - # then - # if [ "$is_public" = "1" ] - # then - # yunohost app action run $app public_private --args is_public=1 - # else - # yunohost app action run $app public_private --args is_public=0 - # fi - # fi - #================================================= # MODIFY OVERWRITTING SETTINGS #=================================================