Commits

Zhang Huangbin  committed 13dafc2

Code cleanup.

  • Participants
  • Parent commits 7eda720

Comments (0)

Files changed (4)

File iRedMail/dialog/config_via_dialog.sh

 case ${ANSWER} in
     Y|y) : ;;
     N|n|*)
-        ECHO_INFO "Canceled, Exit."
+        ECHO_INFO "Cancelled, Exit."
         exit 255
         ;;
 esac

File iRedMail/functions/cleanup.sh

 # -------------------------------------------
 # Misc.
 # -------------------------------------------
+track_iredmail_info()
+{
+    # Help track basic information, used to help iRedMail team understand
+    # which Linux/BSD distribution we should take more care of.
+    # iRedMail version number, OS distribution, release version, code name, backend.
+    ${FETCH_CMD} "http://iredmail.org/version/check.py/iredmail_os?iredmail_version=${PROG_VERSION}&arch=${ARCH}&distro=${DISTRO}&distro_version=${DISTRO_VERSION}&distro_code_name=${DISTRO_CODENAME}&backend=${BACKEND}" &>/dev/null
+
+    rm -f iredmail_os* &>/dev/null
+    echo 'export status_track_iredmail_info="DONE"' >> ${STATUS_FILE}
+}
+
 cleanup_disable_selinux()
 {
     ECHO_INFO "Disable SELinux in /etc/selinux/config."

File iRedMail/functions/packages.sh

 
     export ALL_PKGS ENABLED_SERVICES
 
-    track_iredmail_info()
-    {
-        # Help track basic information, used to help iRedMail team understand
-        # which Linux/BSD distribution we should take more care of.
-        # iRedMail version number, OS distribution, release version, code name, backend.
-        ${FETCH_CMD} "http://iredmail.org/version/check.py/iredmail_os?iredmail_version=${PROG_VERSION}&arch=${ARCH}&distro=${DISTRO}&distro_version=${DISTRO_VERSION}&distro_code_name=${DISTRO_CODENAME}&backend=${BACKEND}" &>/dev/null
-
-        rm -f iredmail_os* &>/dev/null
-        echo 'export status_track_iredmail_info="DONE"' >> ${STATUS_FILE}
-    }
-
     # Install all packages.
     install_all_pkgs()
     {
         echo 'export status_enable_all_services="DONE"' >> ${STATUS_FILE}
     }
 
-    check_status_before_run track_iredmail_info
     check_status_before_run install_all_pkgs
     check_status_before_run enable_all_services
 }

File iRedMail/iRedMail.sh

 
 # User/Group: vmail. We will export vmail uid/gid here.
 . ${FUNCTIONS_DIR}/user_vmail.sh
-
-# Apache & PHP.
 . ${FUNCTIONS_DIR}/apache_php.sh
-
-# OpenLDAP.
 . ${FUNCTIONS_DIR}/openldap.sh
 . ${FUNCTIONS_DIR}/phpldapadmin.sh
-
-# MySQL.
 . ${FUNCTIONS_DIR}/mysql.sh
 . ${FUNCTIONS_DIR}/phpmyadmin.sh
 
-# Switch.
+# Switch backend
 . ${FUNCTIONS_DIR}/backend.sh
 
-# Postfix.
 . ${FUNCTIONS_DIR}/postfix.sh
-
-# Policy service: Policyd.
 . ${FUNCTIONS_DIR}/policy_server.sh
-
-# iRedAPD.
 . ${FUNCTIONS_DIR}/iredapd.sh
-
-# Dovecot.
 . ${FUNCTIONS_DIR}/dovecot.sh
-
-# Managesieve.
 . ${FUNCTIONS_DIR}/managesieve.sh
-
-# ClamAV.
 . ${FUNCTIONS_DIR}/clamav.sh
-
-# Amavisd-new.
 . ${FUNCTIONS_DIR}/amavisd.sh
-
-# SpamAssassin.
 . ${FUNCTIONS_DIR}/spamassassin.sh
-
-# Roundcubemail.
 . ${FUNCTIONS_DIR}/roundcubemail.sh
-
-# Awstats.
 . ${FUNCTIONS_DIR}/awstats.sh
-
-# Fail2ban.
 . ${FUNCTIONS_DIR}/fail2ban.sh
-
-# iRedAdmin.
 . ${FUNCTIONS_DIR}/iredadmin.sh
-
-# Optional components.
 . ${FUNCTIONS_DIR}/optional_components.sh
-
-# Misc.
 . ${FUNCTIONS_DIR}/cleanup.sh
 
 # ************************************************************************
 # *************************** Script Main ********************************
 # ************************************************************************
 
+check_status_before_run track_iredmail_info
+
 # Install all packages.
 check_status_before_run install_all || (ECHO_ERROR "Package installation error, please check the output log." && exit 255)