Skip to content

Commit

Permalink
Merge pull request #1051 from london89/patch-3
Browse files Browse the repository at this point in the history
Update cycle.php
  • Loading branch information
sergejey authored Aug 16, 2022
2 parents b429dad + 28185b7 commit f13ecd9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,22 +183,25 @@
echo "Running: mysql main db restore from file: " . $db_filename . PHP_EOL;
DebMes("Running: mysql main db restore from file: " . $db_filename);
$mysql_path = (substr(php_uname(), 0, 7) == "Windows") ? SERVER_ROOT . "/server/mysql/bin/mysql" : 'mysql';
$mysqlParam = " -u " . DB_USER;
if (DB_PASSWORD != '') $mysqlParam .= " -p" . DB_PASSWORD;
$mysqlParam = " -h " . DB_HOST;
$mysqlParam .= " -u " . DB_USER;
if (DB_PASSWORD != '') $mysqlParam .= " -p'" . DB_PASSWORD."'";
$mysqlParam .= " " . DB_NAME . " <" . $db_filename;
exec($mysql_path . $mysqlParam);

if (file_exists($db_history_filename)) {
echo "Running: mysql history db restore from file: " . $db_history_filename . PHP_EOL;
DebMes("Running: mysql history db restore from file: " . $db_history_filename);
$mysql_path = (substr(php_uname(), 0, 7) == "Windows") ? SERVER_ROOT . "/server/mysql/bin/mysql" : 'mysql';
$mysqlParam = " -u " . DB_USER;
if (DB_PASSWORD != '') $mysqlParam .= " -p" . DB_PASSWORD;
$mysqlParam = " -h " . DB_HOST;
$mysqlParam .= " -u " . DB_USER;
if (DB_PASSWORD != '') $mysqlParam .= " -p'" . DB_PASSWORD."'";
$mysqlParam .= " " . DB_NAME . " <" . $db_history_filename;
exec($mysql_path . $mysqlParam);
}
}


include_once("./load_settings.php"); //

echo "Checking modules.\n";
Expand Down

0 comments on commit f13ecd9

Please sign in to comment.