Browse Source

If MySQL Is Installed Dont Set Wrong Password In ~/.my.cnf

old-stable
Mitesh Shah 11 years ago
parent
commit
b608be4c32
  1. 7
      usr/local/sbin/easyengine

7
usr/local/sbin/easyengine

@ -250,6 +250,12 @@ INSTALLPMA()
MYSQLINSTALLTWEAKS()
{
# MySQL Password Only Set If MySQL Is Not Installed
# If MySQL Is Installed Dont Set Wrong Password In ~/.my.cnf
dpkg -l | grep mysql-server
if [ $? -ne 0 ]
then
# Setting Up MySQL Password
MYSQLAUTOPASS=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 15 | head -n1)
debconf-set-selections <<< "mysql-server mysql-server/root_password password $MYSQLAUTOPASS"
@ -257,6 +263,7 @@ MYSQLINSTALLTWEAKS()
# Generate ~/.my.cnf
echo -e "[client]\nuser=root\npassword=$MYSQLAUTOPASS" > ~/.my.cnf
fi
}
INSTALLMYSQL()

Loading…
Cancel
Save