1. Zhang Huangbin
  2. iredmail

Source

iredmail / iRedMail / functions / optional_components.sh

Diff from to

File iRedMail/functions/optional_components.sh

  • Ignore whitespace
 # -------------------------------------------
 optional_components()
 {
+    # iRedAPD.
+    [ X"${USE_IREDAPD}" == X'YES' ] && \
+        check_status_before_run iredapd_config
+
+    # iRedAdmin.
+    [ X"${USE_IREDADMIN}" == X"YES" ] && \
+        check_status_before_run iredadmin_config
+
+    # Fail2ban.
+    [ X"${USE_FAIL2BAN}" == X'YES' \
+        -a X"${DISTRO}" != X'FREEBSD' \
+        -a X"${DISTRO}" != X'OPENBSD' \
+        ] && \
+        check_status_before_run fail2ban_config
+
+    # Awstats.
+    [ X"${USE_AWSTATS}" == X"YES" ] && \
+        check_status_before_run awstats_config_basic && \
+        check_status_before_run awstats_config_weblog && \
+        check_status_before_run awstats_config_maillog && \
+        check_status_before_run awstats_config_crontab
+
     # Roundcubemail.
     [ X"${USE_RCM}" == X"YES" ] && \
         check_status_before_run rcm_install && \
     [ X"${USE_PHPPGADMIN}" == X"YES" ] && \
         check_status_before_run phppgadmin_install
 
-    # Awstats.
-    if [ X"${DISTRO}" != X'OPENBSD' ]; then
-        [ X"${USE_AWSTATS}" == X"YES" ] && \
-            check_status_before_run awstats_config_basic && \
-            check_status_before_run awstats_config_weblog && \
-            check_status_before_run awstats_config_maillog && \
-            check_status_before_run awstats_config_crontab
-    fi
-
-    # iRedAdmin.
-    [ X"${USE_IREDADMIN}" == X"YES" ] && \
-        check_status_before_run iredadmin_config
-
-    # iRedAPD.
-    [ X"${USE_IREDAPD}" == X'YES' ] && \
-        check_status_before_run iredapd_config
-
-    # Fail2ban.
-    [ X"${USE_FAIL2BAN}" == X'YES' \
-        -a X"${DISTRO}" != X'FREEBSD' \
-        -a X"${DISTRO}" != X'OPENBSD' \
-        ] && \
-        check_status_before_run fail2ban_config
 
 }