From ff2fea8ef2b45cb027a72b8a3b124dd401f6a159 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 23 Mar 2019 02:18:28 +0100 Subject: [PATCH] fix ldap_user --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 6b5d676..5e3f742 100644 --- a/scripts/install +++ b/scripts/install @@ -180,10 +180,10 @@ otp_secret=$(head -n128 /dev/urandom | tail -n +1 | tr -dc -d 'a-z0-9' | head -c ynh_replace_string "__OTP_SECRET__" "$otp_secret" "$final_path/live/.env.production" ynh_app_setting_set "$app" otp_secret "$otp_secret" -ldap_user="${app}_ldap" -ynh_user_exists $ldap_user || ynh_die "LDAP User $app already exist" +ldap_user="${app}ldap" +ynh_user_exists $ldap_user || ynh_die "LDAP User $ldap_user already exist" ldap_password=$(head -n128 /dev/urandom | tail -n +1 | tr -dc -d 'a-z0-9' | head -c128) -yunohost user create username f $app -l $app -m $app@$domain -p $ldap_password -q 0 +yunohost user create username -f $ldap_user -l $ldap_user -m $app@$domain -p $ldap_password -q 0 ynh_replace_string "__LDAP_USER__" "$ldap_user" "${final_path}/live/.env.production" ynh_replace_string "__LDAP_PASSWORD__" "$ldap_password" "${final_path}/live/.env.production" ynh_app_setting_set "$app" ldap_user "$ldap_user"