2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-11 15:51:03 +00:00

Configure barracuda on install

This commit is contained in:
Pratik Vyas 2015-03-26 08:56:28 +05:30
parent 5080e06a4c
commit 3972b4cf60

View File

@ -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