File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -393,8 +393,12 @@ upgrade_start_backup() {
393393 echo " ---- mysql"
394394 fi
395395 cp -f /etc/mysql/* .cnf $HESTIA_BACKUP /conf/mysql/
396+ if [ -d " /etc/mysql/conf.d/" ]; then
396397 cp -f /etc/mysql/conf.d/* .cnf $HESTIA_BACKUP /conf/mysql/ > /dev/null 2>&1
397- cp -f /etc/mysql/mariadb.conf.d/* .cnf $HESTIA_BACKUP /conf/mysql/ > /dev/null 2>&1
398+ fi
399+ if [ -d " /etc/mysql/mariadb.conf.d/" ]; then
400+ cp -f /etc/mysql/mariadb.conf.d/* .cnf $HESTIA_BACKUP /conf/mysql/ > /dev/null 2>&1
401+ fi
398402 fi
399403 if [[ " $DB_SYSTEM " =~ " pgsql" ]]; then
400404 if [ " $DEBUG_MODE " = " true" ]; then
Original file line number Diff line number Diff line change @@ -1464,12 +1464,11 @@ if [ "$mysql" = 'yes' ]; then
14641464 mycnf=" my-large.cnf"
14651465 fi
14661466
1467+ mysql_install_db >> $LOG
14671468 # Remove symbolic link
14681469 rm -f /etc/mysql/my.cnf
1469-
14701470 # Configuring MariaDB
14711471 cp -f $HESTIA_INSTALL_DIR /mysql/$mycnf /etc/mysql/my.cnf
1472- mysql_install_db >> $LOG
14731472
14741473 update-rc.d mysql defaults > /dev/null 2>&1
14751474 systemctl start mysql >> $LOG
Original file line number Diff line number Diff line change @@ -1481,13 +1481,13 @@ if [ "$mysql" = 'yes' ]; then
14811481 if [ $memory -gt 3900000 ]; then
14821482 mycnf=" my-large.cnf"
14831483 fi
1484-
1484+
1485+ # Run mysql_install_db
1486+ mysql_install_db >> $LOG
14851487 # Remove symbolic link
14861488 rm -f /etc/mysql/my.cnf
1487-
14881489 # Configuring MariaDB
14891490 cp -f $HESTIA_INSTALL_DIR /mysql/$mycnf /etc/mysql/my.cnf
1490- mysql_install_db >> $LOG
14911491
14921492 update-rc.d mysql defaults > /dev/null 2>&1
14931493 systemctl start mysql >> $LOG
You can’t perform that action at this time.
0 commit comments