Commit 5bc9d5f3 authored by w4t's avatar w4t

wtserver 0.86

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