diff --git a/scripts/_common.sh b/scripts/_common.sh index b49e33a..907f4dc 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -108,15 +108,6 @@ self.env.cr.commit() chown $app:$app $conf_file } -ynh_sso_access () { - ynh_app_setting_set $app unprotected_uris "/" - - if [[ $is_public -eq 0 ]]; then - ynh_app_setting_set $app protected_uris "$1" - fi - sudo yunohost app ssowatconf -} - ynh_configure () { local TEMPLATE=$1 local DEST=$2 diff --git a/scripts/install b/scripts/install index ef6a4f1..c4da338 100644 --- a/scripts/install +++ b/scripts/install @@ -199,7 +199,12 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= ynh_script_progression --message="Configuring permissions..." -ynh_sso_access "/web/database/manager" +ynh_app_setting_set $app unprotected_uris "/" + +if [[ $is_public -eq 0 ]]; then + ynh_app_setting_set $app protected_uris "/web/database/manager" +fi +sudo yunohost app ssowatconf #================================================= # RELOAD NGINX diff --git a/scripts/restore b/scripts/restore index 0e179cf..0c38b08 100644 --- a/scripts/restore +++ b/scripts/restore @@ -38,7 +38,6 @@ db_user=$db_name export db_pass=$(ynh_app_setting_get --app=$app --key=psqlpwd) export final_path=$(ynh_app_setting_get --app=$app --key=final_path) export conf_file=$(ynh_app_setting_get --app=$app --key=conf_file) -export is_public=0 export bin_file="$final_path/venv/bin/python $final_path/$appname/$FORKNAME-bin" if [ "$app_version" = "9" ]; then bin_file="$final_path/venv/bin/python $final_path/$appname/$FORKNAME.py" diff --git a/scripts/upgrade b/scripts/upgrade index 0be75b9..ddd78f4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,6 @@ export app_version=$(ynh_app_setting_get --app=$app --key=app_version) export oca=$(ynh_app_setting_get --app=$app --key=oca) export port=$(ynh_app_setting_get --app=$app --key=port) export port_chat=$(ynh_app_setting_get --app=$app --key=port_chat) -export is_public=0 export final_path=$(ynh_app_setting_get --app=$app --key=final_path) export conf_file=$(ynh_app_setting_get --app=$app --key=conf_file) export preinstall=0