Commit 88d899db authored by tbrehm's avatar tbrehm
Browse files

Better debugging and exit conditions in mysql databse plugin.

parent a57e0682
...@@ -657,8 +657,10 @@ class installer_base { ...@@ -657,8 +657,10 @@ class installer_base {
$install_dir = $this->conf['ispconfig_install_dir']; $install_dir = $this->conf['ispconfig_install_dir'];
//* Create the ISPConfig installation directory //* Create the ISPConfig installation directory
$command = "mkdir $install_dir"; if(!@is_dir($install_dir)) {
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); $command = "mkdir $install_dir";
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
//* Create a ISPConfig user and group //* Create a ISPConfig user and group
$command = 'groupadd ispconfig'; $command = 'groupadd ispconfig';
...@@ -795,7 +797,7 @@ class installer_base { ...@@ -795,7 +797,7 @@ class installer_base {
//copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost"); //copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
//* and create the symlink //* and create the symlink
if($this->install_ispconfig_interface == true) { if($this->install_ispconfig_interface == true) {
if(!is_link("$vhost_conf_enabled_dir/ispconfig.vhost")) { if(!@is_link("$vhost_conf_enabled_dir/ispconfig.vhost")) {
exec("ln -s $vhost_conf_dir/ispconfig.vhost $vhost_conf_enabled_dir/ispconfig.vhost"); exec("ln -s $vhost_conf_dir/ispconfig.vhost $vhost_conf_enabled_dir/ispconfig.vhost");
} }
} }
......
...@@ -105,6 +105,7 @@ class mysql_clientdb_plugin { ...@@ -105,6 +105,7 @@ class mysql_clientdb_plugin {
$link = mysql_connect($clientdb_host, $clientdb_user, $clientdb_password); $link = mysql_connect($clientdb_host, $clientdb_user, $clientdb_password);
if (!$link) { if (!$link) {
$app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR); $app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR);
return;
} }
//* Rename User //* Rename User
...@@ -164,6 +165,7 @@ class mysql_clientdb_plugin { ...@@ -164,6 +165,7 @@ class mysql_clientdb_plugin {
$link = mysql_connect($clientdb_host, $clientdb_user, $clientdb_password); $link = mysql_connect($clientdb_host, $clientdb_user, $clientdb_password);
if (!$link) { if (!$link) {
$app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR); $app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR);
return;
} }
//* Get the db host setting for the access priveliges //* Get the db host setting for the access priveliges
......
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