1. Samuel Thomas
  2. iredmail

Commits

Zhang Huangbin  committed 817e48f

Improve Gentoo support:
* Awstats now works as expected (mod_auth_mysql)
* Start postfix service to send emails during installation cleaning up

  • Participants
  • Parent commits ade4f8e
  • Branches default

Comments (0)

Files changed (3)

File iRedMail/conf/core

View file
 install_pkg_gentoo()
 {
     ECHO_INFO "Installing package(s) with option(s) '${GENTOO_EMERGE_INSTALL_OPTIONS}': $@"
+    pkgs_total="$(echo $@ | wc -w)"
+    pkgs_counter=1
     for pkg in $@; do
         if [ X"${pkg}" != X'' ]; then
             portname="$( echo ${pkg} | tr -d '-' | tr -d '/' | tr -d '\.' )"
             status="\$status_install_port_$portname"
             if [ X"$(eval echo ${status})" != X"DONE" ]; then
-                ECHO_INFO "Installing package: ${pkg}"
+                ECHO_INFO "Installing package (${pkgs_counter} of ${pkgs_total}): ${pkg}"
                 emerge ${GENTOO_EMERGE_INSTALL_OPTIONS} ${pkg}
 
                 if [ X"$?" == X"0" ]; then
             else
                 ECHO_INFO "Skip package: ${pkg}."
             fi
+            pkgs_counter=$((pkgs_counter+1))
         fi
     done
 }

File iRedMail/functions/awstats.sh

View file
 
     elif [ X"${BACKEND}" == X"MYSQL" ]; then
         # Use mod_auth_mysql.
-        if [ X"${DISTRO}" == X"RHEL" -o X"${DISTRO}" == X"SUSE" -o X"${DISTRO}" == X"FREEBSD" ]; then
+        if [ X"${DISTRO}" == X"RHEL" \
+            -o X"${DISTRO}" == X"SUSE" \
+            -o X"${DISTRO}" == X"GENTOO" \
+            -o X"${DISTRO}" == X"FREEBSD" \
+            ]; then
             cat >> ${AWSTATS_HTTPD_CONF} <<EOF
     AuthType Basic
 
             fi
 
             # OpenSuSE & FreeBSD special.
-            if [ X"${DISTRO}" == X"SUSE" -o X"${DISTRO}" == X"FREEBSD" ]; then
+            if [ X"${DISTRO}" == X"SUSE" \
+                -o X"${DISTRO}" == X"GENTOO" \
+                -o X"${DISTRO}" == X"FREEBSD" \
+                ]; then
                 echo "AuthBasicAuthoritative Off" >> ${AWSTATS_HTTPD_CONF}
             fi
 

File iRedMail/functions/cleanup.sh

View file
     [ X"${DISTRO}" == X"FREEBSD" -o X"${DISTRO}" == X'GENTOO' ] && check_status_before_run cleanup_amavisd_preconfig
     check_status_before_run cleanup_backup_scripts
 
+    # Start Postfix to deliver emails.
+    [ X"${DISTRO}" == X'GENTOO' ] && ${DIR_RC_SCRIPTS}/postfix restart >/dev/null
+
     # Send tip file to the mail server admin and/or first mail user.
     tip_recipient="${FIRST_USER}@${FIRST_DOMAIN}"
     [ ! -z "${MAIL_ALIAS_ROOT}" -a X"${MAIL_ALIAS_ROOT}" != X"${tip_recipient}" ] && \