cc-2193: debian database install fixes

-fixed
This commit is contained in:
martin 2011-04-22 23:02:18 -04:00
parent 42a5df0b57
commit 2fb289bf0a
1 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ class AirtimeInstall
$username = $CC_CONFIG['dsn']['username'];
$password = $CC_CONFIG['dsn']['password'];
$command = "echo \"CREATE USER $username ENCRYPTED PASSWORD '$password' LOGIN CREATEDB NOCREATEUSER;\" | sudo -u postgres psql";
$command = "echo \"CREATE USER $username ENCRYPTED PASSWORD '$password' LOGIN CREATEDB NOCREATEUSER;\" | su postgres -c psql";
@exec($command, $output, $results);
if ($results == 0) {
@ -149,7 +149,7 @@ class AirtimeInstall
$database = $CC_CONFIG['dsn']['database'];
$username = $CC_CONFIG['dsn']['username'];
$command = "echo \"CREATE DATABASE $database OWNER $username\" | sudo -u postgres psql";
$command = "echo \"CREATE DATABASE $database OWNER $username\" | su postgres -c psql";
@exec($command, $output, $results);
if ($results == 0) {
echo "* Database '{$CC_CONFIG['dsn']['database']}' created.".PHP_EOL;