Commits

Zhang Huangbin committed 46207a3

Code cleanup.

  • Participants
  • Parent commits e8c4234

Comments (0)

Files changed (2)

File iRedMail/functions/ldap_server.sh

     ldap_generate_populate_ldif
     export LDAP_ROOTPW_SSHA="$(gen_ldap_passwd ${LDAP_ROOTPW})"
 
-    if [ X"${BACKEND_ORIG}" == X'OPENLDAP' ]; then
+    if [ X"${BACKEND_ORIG}" == X'LDAPD' ]; then
+        . ${FUNCTIONS_DIR}/ldapd.sh
+
+        check_status_before_run ldapd_config
+    else:
         . ${FUNCTIONS_DIR}/openldap.sh
 
         check_status_before_run openldap_config && \
         check_status_before_run openldap_data_initialize
 
-    elif [ X"${BACKEND_ORIG}" == X'LDAPD' ]; then
-        . ${FUNCTIONS_DIR}/ldapd.sh
-
-        check_status_before_run ldapd_config
     fi
 }

File iRedMail/functions/packages.sh

             ALL_PKGS="${ALL_PKGS} openldap mysql"
 
         elif [ X"${DISTRO}" == X'OPENBSD' ]; then
-            if [ X"${BACKEND_ORIG}" == X'OPENLDAP' ]; then
+            if [ X"${BACKEND_ORIG}" != X'LDAPD' ]; then
                 ALL_PKGS="${ALL_PKGS} openldap-server"
                 PKG_SCRIPTS="${PKG_SCRIPTS} ${OPENLDAP_RC_SCRIPT_NAME}"
             fi