Commits

Zhang Huangbin  committed 4499001

* Fixed incorrect FreeBSD port name: www/mod_wsgi -> www/mod_wsgi3.
* Don't hard-code directory name in samples/my.cnf.
* Copy sample mysql config file if no default config file on server.

  • Participants
  • Parent commits b93746c

Comments (0)

Files changed (4)

File iRedMail/functions/cleanup.sh

                 cp -f ${SAMPLE_DIR}/my.cnf ${MYSQL_MY_CNF}
 
                 ECHO_INFO "Enable SSL support for MySQL server."
-                perl -pi -e 's/^#(ssl-cert.*=)(.*)/${1} $ENV{'SSL_CERT_FILE'}/' ${MYSQL_MY_CNF}
-                perl -pi -e 's/^#(ssl-key.*=)(.*)/${1} $ENV{'SSL_KEY_FILE'}/' ${MYSQL_MY_CNF}
+                perl -pi -e 's/^#(ssl-cert.*=)(.*)/${1} $ENV{SSL_CERT_FILE}/' ${MYSQL_MY_CNF}
+                perl -pi -e 's/^#(ssl-key.*=)(.*)/${1} $ENV{SSL_KEY_FILE}/' ${MYSQL_MY_CNF}
                 perl -pi -e 's/^#(ssl-cipher.*)/${1}/' ${MYSQL_MY_CNF}
                 ;;
         esac

File iRedMail/functions/mysql.sh

     # Warning: We must have 'mysql_enable=YES' before start/stop mysql daemon.
     freebsd_enable_service_in_rc_conf 'mysql_enable' 'YES'
 
-    #ECHO_DEBUG "Copy sample/my.cnf to ${MYSQL_MY_CNF}."
-    #if [ ! -f ${MYSQL_MY_CNF} ]; then
-    #    cp ${SAMPLE_DIR}/my.cnf ${MYSQL_MY_CNF} &>/dev/null
-    #fi
+    ECHO_DEBUG "Copy sample/my.cnf to ${MYSQL_MY_CNF}."
+    if [ ! -f ${MYSQL_MY_CNF} ]; then
+        cp ${SAMPLE_DIR}/my.cnf ${MYSQL_MY_CNF} &>/dev/null
+    fi
 
     # Disable 'skip-networking' in my.cnf.
     perl -pi -e 's#^(skip-networking.*)#${1}#' ${MYSQL_MY_CNF} &>/dev/null

File iRedMail/functions/packages_freebsd.sh

 
     # iRedAdmin
     # mod_wsgi
-    ALL_PORTS="${ALL_PORTS} www/mod_wsgi www/webpy devel/py-Jinja2 net/py-netifaces"
+    ALL_PORTS="${ALL_PORTS} www/mod_wsgi3 www/webpy devel/py-Jinja2 net/py-netifaces"
 
     # Fail2ban.
     if [ X"${USE_FAIL2BAN}" == X"YES" ]; then

File iRedMail/samples/my.cnf

 # Sample MySQL configuration file. It should be localted at:
 #
 #   - RHEL/CentOS:  /etc/my.cnf
+#   - FreeBSD (www/mysql56-server): /var/db/mysql/my.cnf
 #
 # Shipped within iRedMail project:
 #   http://www.iredmail.org/
 #bind-address            = 127.0.0.1
 port                    = 3306
 #default-character-set   = utf8
-datadir                 = /var/lib/mysql
-socket                  = /var/lib/mysql/mysql.sock
-user                    = mysql
+#datadir                 = /var/lib/mysql
+#socket                  = /var/lib/mysql/mysql.sock
+#user                    = mysql
 
 #general_log = 1
 #general_log_file = /var/log/mysql.log
 [client]
 default-character-set=utf8
 
-[mysql.server]
-user        = mysql
-basedir     = /var/lib
+#[mysql.server]
+#user        = mysql
+#basedir     = /var/lib
 
-[mysqld_safe]
-log-error   = /var/log/mysqld.log
-pid-file    = /var/run/mysqld/mysqld.pid
+#[mysqld_safe]
+#log-error   = /var/log/mysqld.log
+#pid-file    = /var/run/mysqld/mysqld.pid