Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
2c4a651052
|
@ -0,0 +1,22 @@
|
|||
[database]
|
||||
host = localhost
|
||||
dbname = airtime
|
||||
dbuser = airtime
|
||||
dbpass = airtime
|
||||
|
||||
[rabbitmq]
|
||||
host = 127.0.0.1
|
||||
port = 5672
|
||||
user = guest
|
||||
password = guest
|
||||
vhost = /
|
||||
|
||||
[general]
|
||||
api_key = AAA
|
||||
web_server_user = www-data
|
||||
airtime_dir = x
|
||||
base_files_dir = x
|
||||
|
||||
[soundcloud]
|
||||
connection_retries = 3
|
||||
time_between_retries = 60
|
|
@ -0,0 +1,22 @@
|
|||
[database]
|
||||
host = localhost
|
||||
dbname = airtime
|
||||
dbuser = airtime
|
||||
dbpass = airtime
|
||||
|
||||
[rabbitmq]
|
||||
host = 127.0.0.1
|
||||
port = 5672
|
||||
user = guest
|
||||
password = guest
|
||||
vhost = /
|
||||
|
||||
[general]
|
||||
api_key = AAA
|
||||
web_server_user = www-data
|
||||
airtime_dir = x
|
||||
base_files_dir = x
|
||||
|
||||
[soundcloud]
|
||||
connection_retries = 3
|
||||
time_between_retries = 60
|
|
@ -0,0 +1,22 @@
|
|||
[database]
|
||||
host = localhost
|
||||
dbname = airtime
|
||||
dbuser = airtime
|
||||
dbpass = airtime
|
||||
|
||||
[rabbitmq]
|
||||
host = 127.0.0.1
|
||||
port = 5672
|
||||
user = guest
|
||||
password = guest
|
||||
vhost = /
|
||||
|
||||
[general]
|
||||
api_key = AAA
|
||||
web_server_user = www-data
|
||||
airtime_dir = x
|
||||
base_files_dir = x
|
||||
|
||||
[soundcloud]
|
||||
connection_retries = 3
|
||||
time_between_retries = 60
|
|
@ -0,0 +1,24 @@
|
|||
[database]
|
||||
host = localhost
|
||||
dbname = airtime
|
||||
dbuser = airtime
|
||||
dbpass = airtime
|
||||
|
||||
[rabbitmq]
|
||||
host = 127.0.0.1
|
||||
port = 5672
|
||||
user = guest
|
||||
password = guest
|
||||
vhost = /
|
||||
|
||||
[general]
|
||||
api_key = AAA
|
||||
web_server_user = www-data
|
||||
airtime_dir = x
|
||||
base_files_dir = x
|
||||
base_url = localhost
|
||||
base_port = 80
|
||||
|
||||
[soundcloud]
|
||||
connection_retries = 3
|
||||
time_between_retries = 60
|
|
@ -9,7 +9,42 @@
|
|||
require_once(dirname(__FILE__).'/../../include/AirtimeIni.php');
|
||||
require_once(dirname(__FILE__).'/../../include/AirtimeInstall.php');
|
||||
|
||||
AirtimeIni::CreateIniFiles();
|
||||
|
||||
/**
|
||||
* This function creates the /etc/airtime configuration folder
|
||||
* and copies the default config files to it.
|
||||
*/
|
||||
function CreateIniFiles()
|
||||
{
|
||||
global $AIRTIME_SRC;
|
||||
global $AIRTIME_PYTHON_APPS;
|
||||
|
||||
if (!file_exists("/etc/airtime/")){
|
||||
if (!mkdir("/etc/airtime/", 0755, true)){
|
||||
echo "Could not create /etc/airtime/ directory. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!copy($AIRTIME_SRC."/build/airtime.conf.170", CONF_FILE_AIRTIME)){
|
||||
echo "Could not copy airtime.conf to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy($AIRTIME_PYTHON_APPS."/pypo/pypo.cfg", CONF_FILE_PYPO)){
|
||||
echo "Could not copy pypo.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy($AIRTIME_PYTHON_APPS."/show-recorder/recorder.cfg", CONF_FILE_RECORDER)){
|
||||
echo "Could not copy recorder.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy($AIRTIME_PYTHON_APPS."/pypo/liquidsoap_scripts/liquidsoap.cfg", CONF_FILE_LIQUIDSOAP)){
|
||||
echo "Could not copy liquidsoap.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
CreateIniFiles();
|
||||
AirtimeIni::UpdateIniFiles();
|
||||
|
||||
echo PHP_EOL."*** Updating Database Tables ***".PHP_EOL;
|
||||
|
|
|
@ -53,8 +53,42 @@ foreach ($configFiles as $conf) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function creates the /etc/airtime configuration folder
|
||||
* and copies the default config files to it.
|
||||
*/
|
||||
function CreateIniFiles()
|
||||
{
|
||||
global $AIRTIME_SRC;
|
||||
global $AIRTIME_PYTHON_APPS;
|
||||
|
||||
if (!file_exists("/etc/airtime/")){
|
||||
if (!mkdir("/etc/airtime/", 0755, true)){
|
||||
echo "Could not create /etc/airtime/ directory. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!copy($AIRTIME_SRC."/build/airtime.conf.180", CONF_FILE_AIRTIME)){
|
||||
echo "Could not copy airtime.conf to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy($AIRTIME_PYTHON_APPS."/pypo/pypo.cfg", CONF_FILE_PYPO)){
|
||||
echo "Could not copy pypo.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy($AIRTIME_PYTHON_APPS."/show-recorder/recorder.cfg", CONF_FILE_RECORDER)){
|
||||
echo "Could not copy recorder.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
if (!copy($AIRTIME_PYTHON_APPS."/pypo/liquidsoap_scripts/liquidsoap.cfg", CONF_FILE_LIQUIDSOAP)){
|
||||
echo "Could not copy liquidsoap.cfg to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
echo "* Creating INI files".PHP_EOL;
|
||||
AirtimeIni::CreateIniFiles();
|
||||
CreateIniFiles();
|
||||
|
||||
AirtimeInstall::InstallPhpCode();
|
||||
AirtimeInstall::InstallBinaries();
|
||||
|
|
|
@ -122,7 +122,7 @@ function CreateIniFiles()
|
|||
}
|
||||
}
|
||||
|
||||
if (!copy($AIRTIME_SRC."/build/airtime.conf", CONF_FILE_AIRTIME)){
|
||||
if (!copy($AIRTIME_SRC."/build/airtime.conf.181", CONF_FILE_AIRTIME)){
|
||||
echo "Could not copy airtime.conf to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ function CreateIniFiles()
|
|||
}
|
||||
}
|
||||
|
||||
if (!copy($AIRTIME_SRC."/build/airtime.conf", CONF_FILE_AIRTIME)){
|
||||
if (!copy($AIRTIME_SRC."/build/airtime.conf.182", CONF_FILE_AIRTIME)){
|
||||
echo "Could not copy airtime.conf to /etc/airtime/. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -539,7 +539,8 @@ class Airtime190Upgrade{
|
|||
public static function UninstallBinaries()
|
||||
{
|
||||
echo "* Removing Airtime binaries from ".CONF_DIR_BINARIES.PHP_EOL;
|
||||
exec('rm -rf "'.CONF_DIR_BINARIES.'"');
|
||||
$command = "rm -rf $(ls -d /usr/lib/airtime/* | grep -v airtime_virtualenv)";
|
||||
exec($command);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ class AirtimeCheck {
|
|||
}
|
||||
|
||||
private static function CheckPythonLibrary($lib, $minVersion){
|
||||
$command = "pip freeze | grep $lib";
|
||||
$command = "/usr/lib/airtime/airtime_virtualenv/bin/pip freeze | grep $lib";
|
||||
exec($command, $output, $result);
|
||||
|
||||
$status = AirtimeCheck::CHECK_FAILED;
|
||||
|
|
Loading…
Reference in New Issue