Merge branch '1.8.2' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
9e3c53bd5f
|
@ -1,6 +1,5 @@
|
|||
<VirtualHost *:80>
|
||||
ServerAdmin foo@bar.org
|
||||
ServerName inferno.web.id
|
||||
DocumentRoot /var/www/airtime/public
|
||||
|
||||
<Directory /var/www/airtime/public>
|
||||
|
|
|
@ -11,6 +11,7 @@ if os.geteuid() != 0:
|
|||
try:
|
||||
print "Starting daemontool script recorder"
|
||||
os.system("svc -u /etc/service/recorder")
|
||||
os.system("svc -u /etc/service/recorder/log")
|
||||
|
||||
except Exception, e:
|
||||
print "exception:" + str(e)
|
||||
|
|
|
@ -11,9 +11,11 @@ if os.geteuid() != 0:
|
|||
try:
|
||||
print "Starting daemontool script pypo"
|
||||
os.system("svc -u /etc/service/pypo")
|
||||
os.system("svc -u /etc/service/pypo/log")
|
||||
|
||||
print "Starting daemontool script pypo-liquidsoap"
|
||||
os.system("svc -u /etc/service/pypo-liquidsoap")
|
||||
|
||||
os.system("svc -u /etc/service/pypo-liquidsoap/log")
|
||||
|
||||
except Exception, e:
|
||||
print "exception:" + str(e)
|
||||
|
|
|
@ -11,6 +11,7 @@ if os.geteuid() != 0:
|
|||
try:
|
||||
print "Starting daemontool script recorder"
|
||||
os.system("svc -u /etc/service/recorder")
|
||||
os.system("svc -u /etc/service/recorder/log")
|
||||
|
||||
except Exception, e:
|
||||
print "exception:" + str(e)
|
||||
|
|
|
@ -9,6 +9,8 @@ require_once "$airtime_base_dir/library/php-amqplib/amqp.inc";
|
|||
|
||||
set_error_handler("myErrorHandler");
|
||||
|
||||
AirtimeCheck::GetCpuInfo();
|
||||
AirtimeCheck::GetRamInfo();
|
||||
AirtimeCheck::CheckOsTypeVersion();
|
||||
|
||||
AirtimeCheck::CheckConfigFilesExist();
|
||||
|
@ -170,6 +172,32 @@ class AirtimeCheck {
|
|||
output_status("ICECAST_PROCESS_ID", $status);
|
||||
}
|
||||
|
||||
public static function GetCpuInfo()
|
||||
{
|
||||
$command = "cat /proc/cpuinfo |grep -m 1 'model name' ";
|
||||
exec($command, $output, $result);
|
||||
|
||||
$choppedStr = split(":", $output[0]);
|
||||
$status = trim($choppedStr[1]);
|
||||
output_status("CPU", $status);
|
||||
}
|
||||
|
||||
public static function GetRamInfo()
|
||||
{
|
||||
$command = "cat /proc/meminfo |grep 'MemTotal' ";
|
||||
exec($command, $output, $result);
|
||||
$choppedStr = split(":", $output[0]);
|
||||
$status = trim($choppedStr[1]);
|
||||
output_status("Total RAM", $status);
|
||||
|
||||
$output = null;
|
||||
$command = "cat /proc/meminfo |grep 'MemFree' ";
|
||||
exec($command, $output, $result);
|
||||
$choppedStr = split(":", $output[0]);
|
||||
$status = trim($choppedStr[1]);
|
||||
output_status("Free RAM", $status);
|
||||
}
|
||||
|
||||
public static function CheckConfigFilesExist()
|
||||
{
|
||||
//echo PHP_EOL."Verifying Config Files in /etc/airtime".PHP_EOL;
|
||||
|
@ -394,6 +422,12 @@ class AirtimeCheck {
|
|||
$os_string = "Unknown";
|
||||
}
|
||||
|
||||
// Figure out if 32 or 64 bit
|
||||
$command = "file -b /sbin/init";
|
||||
exec($command, $output, $result);
|
||||
$splitStr = split(",", $output[0]);
|
||||
$os_string .= $splitStr[1];
|
||||
|
||||
output_status("OS", $os_string);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue