-make it so that apache can call airtime-check-system

This commit is contained in:
Martin Konecny 2011-11-08 16:35:33 -05:00
parent 1a94d8bbdc
commit 6f3e6535de

View file

@ -29,7 +29,8 @@ class AirtimeCheck {
public static function ExitIfNotRoot() public static function ExitIfNotRoot()
{ {
// Need to check that we are superuser before running this. // Need to check that we are superuser before running this.
if(exec("whoami") != "root"){ $user = exec("whoami");
if($user != "root" && $user != "www-data"){
echo "Must be root user.\n"; echo "Must be root user.\n";
exit(1); exit(1);
} }