CC-4447: Install minimal -> reinstall uring -r reports ERROR on existing database
-fixed
This commit is contained in:
parent
0e82083ba1
commit
f3250ac616
install_minimal/include
|
@ -215,6 +215,15 @@ class AirtimeInstall
|
|||
$database = $CC_CONFIG['dsn']['database'];
|
||||
$username = $CC_CONFIG['dsn']['username'];
|
||||
#$command = "echo \"CREATE DATABASE $database OWNER $username\" | su postgres -c psql 2>/dev/null";
|
||||
|
||||
$command = "su postgres -c \"psql -l | cut -f2 -d' ' | grep -w 'airtime'\";";
|
||||
exec($command, $output, $rv);
|
||||
|
||||
if ($rv == 0) {
|
||||
//database already exists
|
||||
return true;
|
||||
}
|
||||
|
||||
$command = "su postgres -c \"createdb $database --encoding UTF8 --owner $username\"";
|
||||
|
||||
@exec($command, $output, $results);
|
||||
|
|
Loading…
Reference in New Issue