Subversion Repositories ALCASAR

Rev

Rev 1954 | Rev 1957 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1954 Rev 1955
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1954 2016-06-18 19:46:53Z richard $ 
2
#  $Id: alcasar.sh 1955 2016-06-20 22:10:50Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
 
5
 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
7
# Ce programme est un logiciel libre ; This software is free and open source
7
# Ce programme est un logiciel libre ; This software is free and open source
Line 935... Line 935...
935
	[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
935
	[ -e /etc/my.cnf.default ] || cp /etc/my.cnf /etc/my.cnf.default
936
	$SED "s?^#bind-address.*?bind-address=127.0.0.1?g" /etc/my.cnf
936
	$SED "s?^#bind-address.*?bind-address=127.0.0.1?g" /etc/my.cnf
937
	$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf
937
	$SED "s?^tmpdir.*?tmpdir=/tmp?g" /etc/my.cnf
938
	/usr/bin/systemctl start mysqld.service
938
	/usr/bin/systemctl start mysqld.service
939
	sleep 4
939
	sleep 4
-
 
940
	is_active=`systemctl is-active mysqld` 
-
 
941
	if [ "$is_active" != "active" ]
-
 
942
		then
-
 
943
		sleep 4 # we need to wait again (slow machine)
-
 
944
	fi
940
	mysqladmin -u root password $mysqlpwd
945
	mysqladmin -u root password $mysqlpwd
941
	MYSQL="/usr/bin/mysql -uroot -p$mysqlpwd --exec"
946
	MYSQL="/usr/bin/mysql -uroot -p$mysqlpwd --exec"
942
# Secure the server
947
# Secure the server
943
	$MYSQL="DROP DATABASE IF EXISTS test;DROP DATABASE IF EXISTS tmp;"
948
	$MYSQL="DROP DATABASE IF EXISTS test;DROP DATABASE IF EXISTS tmp;"
944
	$MYSQL="CONNECT mysql;DELETE from user where User='';DELETE FROM user WHERE User='root' AND Host NOT IN ('localhost','127.0.0.1','::1');FLUSH PRIVILEGES;" 
949
	$MYSQL="CONNECT mysql;DELETE from user where User='';DELETE FROM user WHERE User='root' AND Host NOT IN ('localhost','127.0.0.1','::1');FLUSH PRIVILEGES;"