CC-2209:Put database install stuff into separate script

done.
This commit is contained in:
James Moon 2011-05-12 12:05:48 -07:00
parent d9813f21a2
commit bd588f7f3e
1 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,9 @@ AirtimeInstall::UninstallPhpCode();
// still be a connection to the database and you wont be able to delete it.
//------------------------------------------------------------------------
echo " * Dropping the database '".$CC_CONFIG['dsn']['database']."'...".PHP_EOL;
$command = "sudo -u postgres dropdb {$CC_CONFIG['dsn']['database']} 2> /dev/null";
// check if DB exists
$command = "echo \"DROP DATABASE IF EXISTS ".$CC_CONFIG['dsn']['database']."\" | sudo -u postgres psql";
@exec($command, $output, $dbDeleteFailed);
//------------------------------------------------------------------------