mirror of
https://github.com/YunoHost-Apps/chatonsinfos_ynh.git
synced 2024-09-03 18:15:58 +02:00
[fix] local only in function
This commit is contained in:
parent
d2fbcad279
commit
8324c74e20
2 changed files with 8 additions and 8 deletions
|
@ -8,16 +8,16 @@ app=$1
|
|||
|
||||
install_dir=/var/www/chatonsinfos/
|
||||
service_path=${install_dir}public/${app}.properties
|
||||
local groups_added=$4
|
||||
local app_info="$(yunohost app info $app --full --json)"
|
||||
groups_added=$4
|
||||
app_info="$(yunohost app info $app --full --json)"
|
||||
get_info() {
|
||||
echo $app_info | jq -r ".$1"
|
||||
}
|
||||
if [[ "$groups_added" == *"visitors"* ]]
|
||||
then
|
||||
registration=$(ynh_read_var_in_file --file="$service_path" --key="service.registration")
|
||||
local ldap="$(get_info 'manifest.integration.ldap')"
|
||||
local sso="$(get_info 'manifest.integration.sso')"
|
||||
ldap="$(get_info 'manifest.integration.ldap')"
|
||||
sso="$(get_info 'manifest.integration.sso')"
|
||||
if [[ "$registration" != "None" && "$registration" != "Free" ]]
|
||||
then
|
||||
if [[ "$ldap" == "not_relevant" && "$sso" == "not_relevant" ]]
|
||||
|
|
|
@ -8,16 +8,16 @@ app=$1
|
|||
|
||||
install_dir=/var/www/chatonsinfos/
|
||||
service_path=${install_dir}public/${app}.properties
|
||||
local groups_removed=$4
|
||||
local app_info="$(yunohost app info $app --full --json)"
|
||||
groups_removed=$4
|
||||
app_info="$(yunohost app info $app --full --json)"
|
||||
get_info() {
|
||||
echo $app_info | jq -r ".$1"
|
||||
}
|
||||
if [[ "$groups_removed" == *"visitors"* ]]
|
||||
then
|
||||
registration=$(ynh_read_var_in_file --file="$service_path" --key="service.registration")
|
||||
local ldap="$(get_info 'manifest.integration.ldap')"
|
||||
local sso="$(get_info 'manifest.integration.sso')"
|
||||
ldap="$(get_info 'manifest.integration.ldap')"
|
||||
sso="$(get_info 'manifest.integration.sso')"
|
||||
if [[ "$registration" != "Member" && "$registration" != "Client" ]]
|
||||
then
|
||||
ynh_write_var_in_file --file="$service_path" --key="service.registration" --value="Member"
|
||||
|
|
Loading…
Reference in a new issue