diff --git a/install/airtime-uninstall.php b/install/airtime-uninstall.php index 5055bf7c5..065ff6f68 100644 --- a/install/airtime-uninstall.php +++ b/install/airtime-uninstall.php @@ -32,6 +32,7 @@ echo " * Dropping the database '".$CC_CONFIG['dsn']['database']."'...".PHP_EOL; // check if DB exists $command = "echo \"DROP DATABASE IF EXISTS ".$CC_CONFIG['dsn']['database']."\" | sudo -u postgres psql"; + @exec($command, $output, $dbDeleteFailed); //------------------------------------------------------------------------ @@ -68,7 +69,7 @@ if ($dbDeleteFailed) { // Delete the user //------------------------------------------------------------------------ echo " * Deleting database user '{$CC_CONFIG['dsn']['username']}'...".PHP_EOL; -$command = "echo \"DROP USER {$CC_CONFIG['dsn']['username']}\" | su postgres -c psql"; +$command = "echo \"DROP USER IF EXISTS {$CC_CONFIG['dsn']['username']}\" | su postgres -c psql"; @exec($command, $output, $results); if ($results == 0) { echo " * User '{$CC_CONFIG['dsn']['username']}' deleted.".PHP_EOL;