Zhang Huangbin avatar Zhang Huangbin committed 85d8c62

Improve PostgreSQL support on RHEL/CentOS 6:
* Add missing packages
* Configure required Cluebringer settings

Comments (0)

Files changed (6)

iRedMail/functions/cluebringer.sh

     # 3 - Info, notices, warnings, errors
     # 4 - Debugging 
     perl -pi -e 's/^#(log_level=).*/${1}2/' ${CLUEBRINGER_CONF}
+    perl -pi -e 's/^(log_mail=).*/${1}mail\@syslog:native/' ${CLUEBRINGER_CONF}
 
     # File to log to instead of stdout
     perl -pi -e 's/^#(log_file=).*/${1}$ENV{CLUEBRINGER_LOG_FILE}/' ${CLUEBRINGER_CONF}
         perl -pi -e 's/^(DB_Host=).*/${1}$ENV{MYSQL_SERVER}/' ${CLUEBRINGER_CONF}
         perl -pi -e 's/^(DB_Port=).*/${1}$ENV{MYSQL_SERVER_PORT}/' ${CLUEBRINGER_CONF}
     elif [ X"${BACKEND}" == X"PGSQL" ]; then
+        perl -pi -e 's/^(DSN=DBI:Pg:).*/${1}host=$ENV{PGSQL_SERVER};database=$ENV{CLUEBRINGER_DB_NAME};user=$ENV{CLUEBRINGER_DB_USER};password=$ENV{CLUEBRINGER_DB_PASSWD}/' ${CLUEBRINGER_CONF}
+        # Commentted out
         perl -pi -e 's/^#(DSN=DBI:Pg:).*/${1}host=$ENV{PGSQL_SERVER};database=$ENV{CLUEBRINGER_DB_NAME};user=$ENV{CLUEBRINGER_DB_USER};password=$ENV{CLUEBRINGER_DB_PASSWD}/' ${CLUEBRINGER_CONF}
         perl -pi -e 's/^(DB_Type=).*/${1}pgsql/' ${CLUEBRINGER_CONF}
         perl -pi -e 's/^(DB_Host=).*/${1}$ENV{PGSQL_SERVER}/' ${CLUEBRINGER_CONF}

iRedMail/functions/packages.sh

         # Don't append 'iredapd' to ${ENABLED_SERVICES} since we don't have
         # RC script ready in early stage.
 
-        [ X"${DISTRO}" == X"RHEL" ] && ALL_PKGS="${ALL_PKGS} python-ldap${PKG_ARCH}"
+        [ X"${DISTRO}" == X"RHEL" ] && ALL_PKGS="${ALL_PKGS} python-ldap${PKG_ARCH} python-psycopg2${PKG_ARCH}"
         [ X"${DISTRO}" == X"SUSE" ] && ALL_PKGS="${ALL_PKGS} python-ldap"
         [ X"${DISTRO}" == X"DEBIAN" -o X"${DISTRO}" == X"UBUNTU" ] && ALL_PKGS="${ALL_PKGS} python-ldap python-psycopg2 python-mysqldb"
     fi

iRedMail/functions/postgresql.sh

     cp -f ${PGSQL_INIT_SQL_SAMPLE} ${PGSQL_DATA_DIR}/init.sql >/dev/null
     chmod 0777 ${PGSQL_DATA_DIR}/{vmail,init}.sql >/dev/null
     su - ${PGSQL_SYS_USER} -c "psql -d template1 -f ${PGSQL_DATA_DIR}/init.sql" >/dev/null
-    #rm -f ${PGSQL_DATA_DIR}/{vmail,init}.sql >/dev/null
+    rm -f ${PGSQL_DATA_DIR}/{vmail,init}.sql >/dev/null
 
     cat >> ${TIP_FILE} <<EOF
 Virtual Users:

iRedMail/pkgs/MD5.misc

 529bd9131e796e368b68b9aec9c885d0  misc/roundcubemail-0.7.2.tar.gz
 78ca61eb5d7913963f8e42eb3b4f0e95  misc/phpldapadmin-1.2.2.tgz
 ab181a3fffc89e5d5c4ebd62ccfe396b  misc/phpMyAdmin-3.4.9-all-languages.tar.bz2
-e615fc6b21f523371ce2f8679a361846  misc/iRedAPD-1.3.7.tar.bz2
+847c4fad3f9d3120faeca5b2f181248e  misc/iRedAPD-1.3.7.tar.bz2
 ea3030b376d389bbe447f88dfaf832f2  misc/phpPgAdmin-5.0.4.tar.bz2

iRedMail/pkgs/MD5.ubuntu.lucid

 ddd7ba4271056e9ce6b230420fd9b66b  misc/iRedAdmin-0.1.6.tar.bz2
 529bd9131e796e368b68b9aec9c885d0  misc/roundcubemail-0.7.2.tar.gz
-e615fc6b21f523371ce2f8679a361846  misc/iRedAPD-1.3.7.tar.bz2
+847c4fad3f9d3120faeca5b2f181248e  misc/iRedAPD-1.3.7.tar.bz2
 ea3030b376d389bbe447f88dfaf832f2  misc/phpPgAdmin-5.0.4.tar.bz2

iRedMail/pkgs/SHASUM.freebsd.misc

 89a3e2f6272444f8ae55c037d9c09754464d1dcd  misc/iRedAdmin-0.1.6.tar.bz2
-9c702bac1305c3a52727758debf094b97cc155e1  misc/iRedAPD-1.3.6.tar.bz2
-dbc521462c67caddd876a94d5c2eacc6b9cf9dd2  misc/iRedAPD-1.3.7.tar.bz2
+50821158b3e34720ebd99a2628cebe39b8fa2308  misc/iRedAPD-1.3.7.tar.bz2
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.