Fixed inconsistency in vars

This commit is contained in:
2020-09-25 14:22:33 +02:00
parent ba831bd106
commit 05c6bbb37d
3 changed files with 23 additions and 14 deletions

13
conf.sh
View File

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