Hi
I took a look at the script. My guess is that it's PHP because the same script can then be used on both Windows as well as Linux.
Line 7:
PHP Code:
/* find out if we run on Linux/Windows*/
if (strstr($_ENV["OS"], "Windows"))
$WIN32=1;
This simply means set the variable WIN32 to 1 if the environment variable "OS" contains the word "Windows". What error message does it make? If it doesn't matter if it works on Windows or not, you can simply delete those lines.
Line 43:
PHP Code:
if ($_ENV["USER"] != 'root')
die("You must run this as root\n");
This line checkes if the environment variable "USER" is "root" and if not, exit with the error message. The problem here I think is that you run the script with sudo. Then "USER" does not change to root. A better way to check this:
PHP Code:
if (posix_geteuid() != 0)
die("You must run this as root\n");