From 3972b4cf6066a747bc29b5bd9cae596172354ff1 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Thu, 26 Mar 2015 08:56:28 +0530 Subject: [PATCH] Configure barracuda on install --- install_scripts/setup_frappe.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/install_scripts/setup_frappe.sh b/install_scripts/setup_frappe.sh index abcbbdaa..955f7055 100644 --- a/install_scripts/setup_frappe.sh +++ b/install_scripts/setup_frappe.sh @@ -307,6 +307,37 @@ start_services_centos7() { run_cmd systemctl start memcached } +configure_mariadb() { + config=" +[mysqld] +innodb-file-format=barracuda +innodb-file-per-table=1 +innodb-large-prefix=1 +character-set-client-handshake = FALSE +character-set-server = utf8mb4 +collation-server = utf8mb4_unicode_ci + +[mysql] +default-character-set = utf8mb4 + " + deb_cnf_path="/etc/mysql/conf.d/barracuda.cnf" + centos_cnf_path="/etc/my.cnf.d/barracuda.cnf" + + if [ $OS == "centos" ]; then + + echo "$config" > $centos_cnf_path + if [ $OS_VER == "6" ]; then + run_cmd sudo service mysql restart + elif [ $OS_VER == "7" ]; then + run_cmd sudo systemctl restart mysql + fi + + elif [ $OS == "debian" ] || [ $OS == "Ubuntu" ]; then + echo "$config" > $deb_cnf_path + sudo service mysql restart + fi +} + setup_debconf() { debconf-set-selections <<< "postfix postfix/mailname string `hostname`" debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'" @@ -400,6 +431,7 @@ main() { fi configure_mariadb_centos fi + configure_mariadb echo "Adding frappe user" add_user install_bench