Merge branch 'master' of dev.sourcefabric.org:airtime

Conflicts:
	VERSION
	airtime_mvc/application/configs/conf.php
	airtime_mvc/application/models/Playlist.php
	airtime_mvc/application/models/Schedule.php
	airtime_mvc/application/models/Shows.php
	airtime_mvc/application/models/StoredFile.php
	airtime_mvc/application/views/scripts/form/preferences_general.phtml
	airtime_mvc/application/views/scripts/user/remove-user.phtml
	airtime_mvc/public/js/airtime/schedule/add-show.js
	airtime_mvc/public/js/airtime/schedule/schedule.js
	install/airtime-upgrade.php
	install/include/AirtimeInstall.php
	python_apps/api_clients/api_client.py
	utils/airtime-clean-storage
	utils/airtime-clean-storage.php
	utils/airtime-import
	utils/airtime-import.php
This commit is contained in:
Paul Baranowski 2011-04-25 17:24:53 -04:00
commit eb76bbe7f0
17 changed files with 254 additions and 129 deletions

View file

@ -124,9 +124,9 @@ class AirtimeInstall
echo "* Creating Airtime database user".PHP_EOL;
// Create the database user
$command = "sudo -u postgres psql postgres --command \"CREATE USER {$CC_CONFIG['dsn']['username']} "
." ENCRYPTED PASSWORD '{$CC_CONFIG['dsn']['password']}' LOGIN CREATEDB NOCREATEUSER;\" 2>/dev/null";
$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";
@exec($command, $output, $results);
if ($results == 0) {
@ -148,7 +148,9 @@ class AirtimeInstall
echo "* Creating Airtime database".PHP_EOL;
$command = "sudo -u postgres createdb {$CC_CONFIG['dsn']['database']} --owner {$CC_CONFIG['dsn']['username']} 2> /dev/null";
$database = $CC_CONFIG['dsn']['database'];
$username = $CC_CONFIG['dsn']['username'];
$command = "echo \"CREATE DATABASE $database OWNER $username\" | sudo -u postgres psql";
@exec($command, $output, $results);
if ($results == 0) {
echo "* Database '{$CC_CONFIG['dsn']['database']}' created.".PHP_EOL;
@ -324,13 +326,13 @@ class AirtimeInstall
global $CC_CONFIG;
echo "* Creating logs directory ".AirtimeInstall::CONF_DIR_LOG.PHP_EOL;
$path = AirtimeInstall::CONF_DIR_LOG;
$file = $path.'/zendphp.log';
if (!file_exists($path)){
mkdir($path, 0755, true);
}
touch($file);
chmod($file, 0755);
chown($file, $CC_CONFIG['webServerUser']);
@ -340,7 +342,7 @@ class AirtimeInstall
public static function RemoveLogDirectories(){
$path = AirtimeInstall::CONF_DIR_LOG;
echo "* Removing logs directory ".$path.PHP_EOL;
exec("rm -rf $path");
}
}