Better debugging and exit conditions in mysql databse plugin.
| | |
| | | $install_dir = $this->conf['ispconfig_install_dir']; |
| | | |
| | | //* Create the ISPConfig installation directory |
| | | if(!@is_dir($install_dir)) { |
| | | $command = "mkdir $install_dir"; |
| | | caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | } |
| | | |
| | | //* Create a ISPConfig user and group |
| | | $command = 'groupadd ispconfig'; |
| | |
| | | //copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost"); |
| | | //* and create the symlink |
| | | 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"); |
| | | } |
| | | } |
| | |
| | | $link = mysql_connect($clientdb_host, $clientdb_user, $clientdb_password); |
| | | if (!$link) { |
| | | $app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR); |
| | | return; |
| | | } |
| | | |
| | | //* Rename User |
| | |
| | | $link = mysql_connect($clientdb_host, $clientdb_user, $clientdb_password); |
| | | if (!$link) { |
| | | $app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR); |
| | | return; |
| | | } |
| | | |
| | | //* Get the db host setting for the access priveliges |