Commit 5bc9d5f3 authored by w4t's avatar w4t

wtserver 0.86

parent 0d63140f
......@@ -30,31 +30,17 @@ InstallISPConfig() {
echo -e "[${green}DONE${NC}]"
fi
# Extract the downloaded package
echo -n -e "$IDENTATION_LVL_1 Extracting the downloaded package... "
cd $PROGRAMS_INSTALL_DOWNLOAD
tar xfz $PROGRAMS_INSTALL_DOWNLOAD/ISPConfig-*.tar.gz >>$PROGRAMS_INSTALL_LOG_FILES 2>&1
AUTO_INSTALL_INI_LOCATION=$PROGRAMS_INSTALL_DOWNLOAD/ispconfig3_install/install
cd $AUTO_INSTALL_INI_LOCATION
echo -e "[${green}DONE${NC}]" # Extract the downloaded package
echo -n -e "$IDENTATION_LVL_1 Extracting the downloaded package... "
cd $PROGRAMS_INSTALL_DOWNLOAD
tar xfz $PROGRAMS_INSTALL_DOWNLOAD/ISPConfig-*.tar.gz >>$PROGRAMS_INSTALL_LOG_FILES 2>&1
AUTO_INSTALL_INI_LOCATION=$PROGRAMS_INSTALL_DOWNLOAD/ispconfig3_install/install
cd $AUTO_INSTALL_INI_LOCATION
echo -e "[${green}DONE${NC}]"
CFG_MYSQL_ISPCONFIG_PWD=$(tr </dev/urandom -dc 'A-Za-z0-9' | head -c${1:-29})
if [ "$CFG_SQLSERVER" == "MariaDB" ]; then
SQL_COMMAND="mariadb"
else
SQL_COMMAND="mysql"
fi
$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "CREATE USER 'ispconfig'@'localhost' IDENTIFIED BY '$CFG_MYSQL_ISPCONFIG_PWD';"
$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "GRANT ALL PRIVILEGES ON *.* TO 'ispconfig'@'localhost' WITH GRANT OPTION;"
$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "ALTER USER 'ispconfig'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD($CFG_MYSQL_ISPCONFIG_PWD);"
$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "flush privileges;"
#CFG_MYSQL_ISPCONFIG_PWD=$(tr </dev/urandom -dc 'A-Za-z0-9' | head -c${1:-29})
#if [ "$CFG_SQLSERVER" == "MariaDB" ]; then
#SQL_COMMAND="mariadb"
#else
#SQL_COMMAND="mysql"
#fi
#$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "CREATE USER 'ispconfig'@'localhost' IDENTIFIED BY '$CFG_MYSQL_ISPCONFIG_PWD';"
#$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "GRANT ALL PRIVILEGES ON *.* TO 'ispconfig'@'localhost' WITH GRANT OPTION;"
#$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "ALTER USER 'ispconfig'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD($CFG_MYSQL_ISPCONFIG_PWD);"
#$SQL_COMMAND -uroot -p"$CFG_MYSQL_ROOT_PWD" -e "flush privileges;"
if [ "$CFG_ISPC" == "standard" ]; then
echo -n -e "$IDENTATION_LVL_1 Creating autoinstall configuration file... "
......
......@@ -201,9 +201,9 @@ default-authentication-plugin=mysql_native_password
expect \"Change the root password?\"
send \"y\r\"
expect \"New password:\"
send \"$env(CFG_MYSQL_ROOT_PWD)\r\"
send \"$CFG_MYSQL_ROOT_PWD\r\"
expect \"Re-enter new password:\"
send \"$env(CFG_MYSQL_ROOT_PWD)\r\"
send \"$CFG_MYSQL_ROOT_PWD\r\"
expect \"Remove anonymous users?\"
send \"y\r\"
expect \"Disallow root login remotely?\"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment