[cod] Start COD4 Linux Dedicated via Webinterface

escapedturkey escapedturkey at escapedturkey.com
Wed Dec 9 09:10:41 EST 2009


Hrm. Be sure to check the permissions.

Is the webserver running as root? As good advice, always run a game 
server under a username, never under root.

If you need root to launch items try something like:

su - $username -c "cd && /somedir/gameserver.sh cod4 start"

:)



Taraman wrote:
> Hi escapedturkey,
> 
> Nohup does not work... ;-(
> 
> One thing I forgot to mention:
> The Webserver runs as the same user that normally runs the server.
> 
> Taraman
> 
> escapedturkey schrieb:
>> /somedir/gameserver.sh cod4 start
>>
>> I'm not familiar with your script, but you may want to try:
>>
>> nohup scriptname, etc, etc.
>>
>> http://en.wikipedia.org/wiki/Nohup
>>
>> Josh Luthman wrote:
>>> Sounds like a PHP problem - irc://irc.freenode.net/#php
>>>
>>> On 12/9/09, Taraman <Taraman at gmx.de> wrote:
>>>> Hi,
>>>>
>>>> I'm just programming a Webinterface for our LAN-server.
>>>> My problem is, that the cod4 server does not start via the 
>>>> Webinterface.
>>>>
>>>> I have a Shell-script called gameserver.sh that starts the different
>>>> servers via "/somedir/gameserver.sh cod4 start"
>>>> This script works fine when used from a terminal - also if called from
>>>> different directories. The Server itself is then running like a charm.
>>>> The Script basically changes the directory to the game directory via 
>>>> "cd
>>>> /home/me/cod4" and then launches the server with Screen -dmS
>>>>
>>>> In the Webinterface the script is called by PHP with
>>>> "System('/home/me/gameserver.sh cod4 start', $status);"
>>>> With this the Script says "Server Started" and the program is launched,
>>>> but the process dies again immediately.
>>>>
>>>> I have a hard time debugging the error, because I don't get any error
>>>> messages. The server does not live long enough to write a log and the
>>>> PHP System command does not give me any useful output (I also tried to
>>>> start the server directly).
>>>>
>>>> Does anyone have an Idea, what the problem is, or how I can get useful
>>>> error Information?
>>>>
>>>> Taraman
>>>>
>>>> _______________________________________________
>>>> cod mailing list
>>>> cod at icculus.org
>>>> http://icculus.org/mailman/listinfo/cod
>>>>
>>>
>> _______________________________________________
>> cod mailing list
>> cod at icculus.org
>> http://icculus.org/mailman/listinfo/cod
>>
> _______________________________________________
> cod mailing list
> cod at icculus.org
> http://icculus.org/mailman/listinfo/cod
> 


More information about the cod mailing list