-remove sudo requirement for airtime-check-system
This commit is contained in:
parent
23d25ef5d7
commit
f5b55ce52b
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
AirtimeCheck::ExitIfNotRoot();
|
||||
|
||||
$airtimeIni = AirtimeCheck::GetAirtimeConf();
|
||||
$airtime_base_dir = $airtimeIni['general']['airtime_dir'];
|
||||
|
||||
|
@ -57,20 +55,6 @@ class AirtimeCheck {
|
|||
|
||||
public static $check_system_ok = true;
|
||||
|
||||
/**
|
||||
* Ensures that the user is running this PHP script with root
|
||||
* permissions. If not running with root permissions, causes the
|
||||
* script to exit.
|
||||
*/
|
||||
public static function ExitIfNotRoot()
|
||||
{
|
||||
// Need to check that we are superuser before running this.
|
||||
if(exec("whoami") != "root"){
|
||||
echo "Must be root user.\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static function CheckAirtimePlayoutRunning()
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue