CC-2209:Put database install stuff into separate script
done.
This commit is contained in:
parent
d9813f21a2
commit
bd588f7f3e
|
@ -29,7 +29,9 @@ AirtimeInstall::UninstallPhpCode();
|
||||||
// still be a connection to the database and you wont be able to delete it.
|
// 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;
|
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);
|
@exec($command, $output, $dbDeleteFailed);
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue