Fix errors accesseing Mysql database for installation/upgrading roundcube webmailer.

This commit is contained in:
2017-11-05 04:39:08 +01:00
parent 6afef61382
commit a53d252d69
2 changed files with 23 additions and 9 deletions

View File

@ -233,7 +233,7 @@ echo -e "\n\n \033[37m\033[1mCreate some Backups..\033[m\n"
echononl " Backup existing Database '$DB_NAME'"
if [[ "$DB_TYPE" = "mysql" ]]; then
echo -n " (MySQL).."
mysqldump -u$_mysql_rootuser -p$_mysql_rootpass --opt $DB_NAME > ${WEBSITE_BASEDIR}/${DB_NAME}.$backup_date 2> $log_file
mysqldump $MYSQL_CREDENTIALS --opt $DB_NAME > ${WEBSITE_BASEDIR}/${DB_NAME}.$backup_date.sql 2> $log_file
if [[ $? -eq 0 ]]; then
echo_ok
else
@ -332,7 +332,7 @@ fi
echononl " Stop Apache Webserver.."
if $SYSTEMD_EXISTS ; then
systemctl stop apache2
systemctl stop apache2 > $log_file 2>&1
if [[ $? -eq 0 ]]; then
echo_ok
else
@ -340,7 +340,7 @@ if $SYSTEMD_EXISTS ; then
fatal "$(cat $log_file)"
fi
else
/etc/init.d/apache2 stop
/etc/init.d/apache2 stop > ${logdir}/main.log 2>&1
if [[ $? -eq 0 ]]; then
echo_ok
else