diff --git a/lib/functions.sh b/lib/functions.sh index b62c8bf..2c9a2d6 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -1535,8 +1535,14 @@ get_appvars() { LDAP_DOMAIN_LAST=$(echo "${LDAP_DOMAIN_ARRAY[2]}" | awk -F= '{ print $2 }') fi - # Set SMTP user based on if fcore exists - [[ $(docker exec ldap slapcat | grep fcore) ]] && SMTPUSER="fcore" || SMTPUSER="admin" + # Set SMTP user based on if fcore or admin exists + if [[ $(docker exec ldap slapcat | grep fcore) ]]; then + SMTPUSER="fcore" + elif [[ $(docker exec ldap slapcat | grep admin) ]]; then + SMTPUSER="admin" + else + SMTPUSER="fcore" + fi } get_appvars_old() { LDAP_SECRET=`cat /federated/apps/ldap/.ldap.secret`