Commits

Zhang Huangbin committed bff8702

Improve Gentoo support.

  • Participants
  • Parent commits fef9eb9

Comments (0)

Files changed (4)

iRedMail/conf/awstats

 
     # This path will be changed in 'functions/awstats.sh'.
     export AWSTATS_CGI_DIR="/usr/lib/cgi-bin"
+
+elif [ X"${DISTRO}" == X"GENTOO" ]; then
+    export AWSTATS_CONF_SAMPLE="${AWSTATS_CONF_DIR}/awstats.model.conf"
+    export AWSTATS_HTTPD_ROOT='/usr/share/awstats/wwwroot'
+    export AWSTATS_CGI_DIR="${AWSTATS_HTTPD_ROOT}/cgi-bin"
+    export AWSTATS_ICON_DIR="${AWSTATS_HTTPD_ROOT}/icon"
+    export AWSTATS_CSS_DIR="${AWSTATS_HTTPD_ROOT}/css"
+    export AWSTATS_JS_DIR="${AWSTATS_HTTPD_ROOT}/js"
+
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     export AWSTATS_HTTPD_ROOT="${HTTPD_SERVERROOT}/awstats"
     export AWSTATS_ICON_DIR="${AWSTATS_HTTPD_ROOT}/icon"

iRedMail/conf/core

 
     # Create necessary directories.
     mkdir -p ${SSL_KEY_DIR} ${SSL_CERT_DIR} 2>/dev/null
+    [ X"${DISTRO}" == X"GENTOO" ] && chmod +rw ${SSL_KEY_DIR}
 
     openssl req \
         -x509 -nodes -days 3650 -newkey rsa:${SSL_KEY_SIZE} \

iRedMail/functions/mysql.sh

 
     ECHO_DEBUG "Starting MySQL."
 
+    # Gentoo: Initial MySQL database first
+    [ X"${DISTRO}" == X"GENTOO" ] && \
+        /usr/bin/mysql_install_db &>/dev/null
+
     # FreeBSD: Start mysql when system start up.
     # Warning: We must have 'mysql_enable=YES' before start/stop mysql daemon.
     [ X"${DISTRO}" == X"FREEBSD" ] && cat >> /etc/rc.conf <<EOF

iRedMail/functions/packages.sh

         ALL_PKGS="${ALL_PKGS} dev-python/jinja dev-python/webpy dev-python/mysql-python"
         [ X"${USE_IREDAPD}" != "YES" ] && ALL_PKGS="${ALL_PKGS} dev-python/python-ldap"
 
-        gentoo_add_use_flags 'dev-python/jinja' 'doc examples i18n vim-syntax'
+        gentoo_add_use_flags 'dev-python/jinja' 'examples i18n vim-syntax'
     fi
 
     #############