Fixed inconsistency in vars
This commit is contained in:
13
conf.sh
13
conf.sh
@@ -3,19 +3,22 @@ mrepo=https://git.ictmaatwerk.com/VPS-scripts/MySQL
|
||||
mbranch=master
|
||||
|
||||
if [ -z ${PHPMyadmin+x} ]; then echo 'Error $PHPMyadmin is not set, Setting default OFF' && PHPMyadmin=0;fi #check if Var is set
|
||||
systemctl stop mysql
|
||||
|
||||
rm -rf /etc/mysql/ /etc/my.cnf.d/ /etc/my.cnf
|
||||
mkdir /etc/mysql/
|
||||
wget -q -t7 "$mrepo"/raw/branch/"$mbranch"/config/MySQL/mysqld-V8.cnf -O /etc/mysql/my.cnf
|
||||
if [ "$osrel" = "ubu1804" ] || [ "$osrel" = "ubu2004" ] || [ "$osrel" = "deb10" ] ; then
|
||||
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
|
||||
MYSQLSNAME=mysql
|
||||
systemctl stop $MYSQLSNAME
|
||||
sed -i 's#MySQLlog#/var/log/mysql/error.log#g' /etc/mysql/my.cnf
|
||||
elif [ "$osrel" = "cent8" ]; then
|
||||
elif [ "$shortdist" = "cent8" ]; then
|
||||
systemctl stop $MYSQLSNAME
|
||||
MYSQLSNAME=mysqld
|
||||
sed -i 's#MySQLlog#/var/log/mysqld.log#g' /etc/mysql/my.cnf
|
||||
fi
|
||||
|
||||
systemctl start mysql
|
||||
systemctl enable mysql
|
||||
systemctl start $MYSQLSNAME
|
||||
systemctl enable $MYSQLSNAME
|
||||
|
||||
|
||||
if [ $PHPMyadmin = 1 ]; then
|
||||
|
||||
Reference in New Issue
Block a user