From 5ad47e7d4aed69112078685f128b744f9f9b399a Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Jan 2025 12:57:54 +0000 Subject: [PATCH] Fixed SMTPUSER set for plus --- lib/functions.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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`