Commit 614365f8 authored by tbrehm's avatar tbrehm
Browse files

The server log priority setting is now preserved when the system is updated.

parent 37d75569
......@@ -8,6 +8,7 @@ $conf['distname'] = 'debian40';
$conf['hostname'] = 'server1.example.com'; // Full hostname
$conf['ispconfig_install_dir'] = '/usr/local/ispconfig';
$conf['ispconfig_config_dir'] = '/usr/local/ispconfig';
$conf['ispconfig_log_priority'] = 2; // 0 = Debug, 1 = Warning, 2 = Error
$conf['server_id'] = 1;
$conf['init_scripts'] = '/etc/init.d';
$conf['runlevel'] = '/etc';
......
......@@ -705,6 +705,7 @@ class installer_base {
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
$content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content);
$content = str_replace('{server_id}', $conf['server_id'], $content);
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
wf("$install_dir/server/lib/$configfile", $content);
......
......@@ -106,7 +106,7 @@ define("DB_PASSWORD",$conf["db_password"]);
*/
$conf["log_file"] = $conf["rootpath"].$conf["fs_div"]."ispconfig.log";
$conf["log_priority"] = 2; // 0 = Debug, 1 = Warning, 2 = Error
$conf["log_priority"] = {ispconfig_log_priority}; // 0 = Debug, 1 = Warning, 2 = Error
/*
Themes
......
......@@ -82,6 +82,7 @@ $conf["mysql"]["ispconfig_user"] = $conf_old["db_user"];
$conf["mysql"]["ispconfig_password"] = $conf_old["db_password"];
$conf['server_id'] = $conf_old["server_id"];
$conf['ispconfig_log_priority'] = $conf_old["ispconfig_log_priority"];
$inst = new installer();
......
......@@ -175,11 +175,17 @@ class mysql_clientdb_plugin {
$db_host = 'localhost';
}
mysql_query("DROP USER '".addslashes($data["old"]["database_user"])."'@'$db_host';",$link);
$app->log('Dropping mysql user: '.$data["old"]["database_user"],LOGLEVEL_DEBUG);
if(mysql_query("DROP USER '".addslashes($data["old"]["database_user"])."'@'$db_host';",$link)) {
$app->log('Dropping mysql user: '.$data["old"]["database_user"],LOGLEVEL_DEBUG);
} else {
$app->log('Error while dropping mysql user: '.$data["old"]["database_user"].' '.mysql_error($link),LOGLEVEL_ERROR);
}
mysql_query('DROP DATABASE '.addslashes($data["old"]["database_name"]),$link);
$app->log('Dropping mysql database: '.$data["old"]["database_name"],LOGLEVEL_DEBUG);
if(mysql_query('DROP DATABASE '.addslashes($data["old"]["database_name"]),$link)) {
$app->log('Dropping mysql database: '.$data["old"]["database_name"],LOGLEVEL_DEBUG);
} else {
$app->log('Error while dropping mysql database: '.$data["old"]["database_name"].' '.mysql_error($link),LOGLEVEL_ERROR);
}
mysql_query("FLUSH PRIVILEGES;",$link);
......
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