I made this script with php
PHP Code:
$name="CoD2-test";
$extra="+set net_port 28990 +set g_gametype sd +map mp_toujane";
$dir="/home/servers/cod2/War_Servers";
$exe="cod2_lnxded";
$exec=$dir."/".$exe;
echo shell_exec('cd '.$dir);
echo shell_exec('screen -d -m -S root '.$name.$exec.$extra);
and when I run it it give me this error.
Cannot make directory '/var/run/screen': File exists
The directory already exists and there are other screens running.I think this is a server related error. Any help?
I am running CentOS 6.0 Final