Skip to content
Snippets Groups Projects
Commit c51b57e0 authored by Florian Schaal's avatar Florian Schaal
Browse files

fixed uninstaller

parent 7d6777cb
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ error_reporting(E_ALL|E_STRICT); ...@@ -36,7 +36,7 @@ error_reporting(E_ALL|E_STRICT);
require_once "/usr/local/ispconfig/server/lib/config.inc.php"; require_once "/usr/local/ispconfig/server/lib/config.inc.php";
require_once "/usr/local/ispconfig/server/lib/app.inc.php"; require_once "/usr/local/ispconfig/server/lib/app.inc.php";
require "/usr/local/ispconfig/server/mysql_clientdb.conf"; require "/usr/local/ispconfig/server/lib/mysql_clientdb.conf";
//** The banner on the command line //** The banner on the command line
echo "\n\n".str_repeat('-', 80)."\n"; echo "\n\n".str_repeat('-', 80)."\n";
...@@ -51,7 +51,7 @@ echo " _____ ___________ _____ __ _ ____ ...@@ -51,7 +51,7 @@ echo " _____ ___________ _____ __ _ ____
echo "\n".str_repeat('-', 80)."\n"; echo "\n".str_repeat('-', 80)."\n";
echo "\n\n>> Uninstall \n\n"; echo "\n\n>> Uninstall \n\n";
echo "Are you sure you want to uninsatll ISPConfig? [no]"; echo "Are you sure you want to uninstall ISPConfig? [no]";
$input = fgets(STDIN); $input = fgets(STDIN);
$do_uninstall = rtrim($input); $do_uninstall = rtrim($input);
...@@ -62,11 +62,11 @@ if($do_uninstall == 'yes') { ...@@ -62,11 +62,11 @@ if($do_uninstall == 'yes') {
$link = mysqli_connect($clientdb_host, $clientdb_user, $clientdb_password); $link = mysqli_connect($clientdb_host, $clientdb_user, $clientdb_password);
if (!$link) { if (!$link) {
echo "Unable to connect to the database'.mysql_error($link)"; echo "Unable to connect to the database. mysql_error($link)";
} else { } else {
$result=mysqli_query($link,"DROP DATABASE ".$conf['db_database']."';"); $result=mysqli_query($link,"DROP DATABASE ".$conf['db_database'].";");
if (!$result) echo "Unable to remove the ispconfig-database ".$conf['db_database']." ".mysqli_error($link)."\n"; if (!$result) echo "Unable to remove the ispconfig-database ".$conf['db_database']." ".mysqli_error($link)."\n";
$result=mysqli_query($link,"DROP USER '".$conf['db_user'] ."';"); $result=mysqli_query($link,"DROP USER '".$conf['db_user']."'@'".$conf['db_host']."';");
if (!$result) echo "Unable to remove the ispconfig-database-user ".$conf['db_user']." ".mysqli_error($link)."\n"; if (!$result) echo "Unable to remove the ispconfig-database-user ".$conf['db_user']." ".mysqli_error($link)."\n";
} }
mysqli_close($link); mysqli_close($link);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment