Sign in to follow this  
HydroxZ

CoD 4 Server Help (Linux)

Recommended Posts

I have a problem, i used to have a 2GB VPS that would run cod4 with the standard linux binaries (ones found here http://www.fpsadmin.com/forum/showthread.php?t=15224 ) which i had no problem with, worked perfectly, i then decided to upgrade the vps to 4GB so since i have 4GB i upgraded to 64bit version of Ubuntu 14.04 LTS and do the same process i did before, and the server terminates the screen before the cod4 server can even start i am setting the cod4_lnxded file with 755 perms, is there any idea on how to make the server run? heres the screen line

screen -A -m -d -S games /usr/local/games/cod4-linux-server/cod4/cod4_lnxded +set sv_pure 1 +set dedicated 2 +set fs_game mods/pml219_ne +set fs_homepath /usr/local/games/cod4-linux-server/cod4 +set net_ip 108.61.213.105 +set net_port 28930 +set sv_punkbuster 1 +exec server.cfg +map_rotate

Share this post


Link to post
Share on other sites

I have a problem, i used to have a 2GB VPS that would run cod4 with the standard linux binaries (ones found here http://www.fpsadmin.com/forum/showthread.php?t=15224 ) which i had no problem with, worked perfectly, i then decided to upgrade the vps to 4GB so since i have 4GB i upgraded to 64bit version of Ubuntu 14.04 LTS and do the same process i did before, and the server terminates the screen before the cod4 server can even start i am setting the cod4_lnxded file with 755 perms, is there any idea on how to make the server run? heres the screen line

screen -A -m -d -S games /usr/local/games/cod4-linux-server/cod4/cod4_lnxded +set sv_pure 1 +set dedicated 2 +set fs_game mods/pml219_ne +set fs_homepath /usr/local/games/cod4-linux-server/cod4 +set net_ip 108.61.213.105 +set net_port 28930 +set sv_punkbuster 1 +exec server.cfg +map_rotate

Try running it without screen and tell us what error terminates the server please.

Share this post


Link to post
Share on other sites


cd games /usr/local/games/cod4-linux-server/cod4/

then


./cod4_lnxded +set sv_pure 1 +set dedicated 2 +set fs_game mods/pml219_ne +set fs_homepath /usr/local/games/cod4-linux-server/cod4 +set net_ip 108.61.213.105 +set net_port 28930 +set sv_punkbuster 1 +exec server.cfg +map_rotate

Share this post


Link to post
Share on other sites

Im using ubuntu 14.04

My startup for large mod custom + screen

#!/bin/sh

# Copyright © 2013 www.codutility-france.fr

# All rights reserved

COMMANDLINE_PARAMETERS="+set dedicated 2 +set net_port 28960 +set sv_punkbuster 1 +set fs_game mods/ow2 set sv_maxclients 64 +set ui_maxclients 64 +exec server.cfg +map_rotate &"

BINARYNAME="iw3mp.exe"

BINARYPATH="/home/xxx/cod4_1"

cd "${BINARYPATH}"

LIBRARYPATH="$(pwd)"

PID=cod4_1.pid

case "$1" in

start)

if [ -e $PID ]; then

echo "$PID found, but no server running. Possibly your previously started server crashed"

rm $PID

fi

if [ "${UID}" = "0" ]; then

echo WARNING ! For security reasons we advise: DO NOT RUN THE SERVER AS ROOT

for c in $(seq 1 10); do

echo -n "!"

sleep 1

done

echo "!"

fi

echo "Starting the Call of Duty 4"

if [ -e "$BINARYNAME" ]; then

if [ ! -x "$BINARYNAME" ]; then

echo "${BINARYNAME} is not executable, trying to set it"

chmod u+x "${BINARYNAME}"

fi

if [ -x "$BINARYNAME" ]; then

export LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}"

nohup Xvfb :1 -screen 0 800x600x16 &

DISPLAY=localhost:1.0 nohup wine "./${BINARYNAME}" ${COMMANDLINE_PARAMETERS} > /dev/null &

echo $! > $PID

echo "Call of Duty 4 server started, for details please view the log file"

else

echo "${BINARNAME} is not exectuable, cannot start Call of Duty 4 server"

fi

else

echo "Could not find ${BINARYNAME}, aborting"

exit 5

fi

;;

stop)

if [ -e $PID ]; then

echo -n "Stopping the Call of Duty 4 server"

if ( kill -TERM $(cat $PID) 2> /dev/null ); then

for c in $(seq 1 300); do

if ( kill -0 $(cat $PID) 2> /dev/null ); then

echo -n "."

sleep 1

else

break

fi

done

fi

if ( kill -0 $(cat $PID) 2> /dev/null ); then

echo "Server is not shutting down cleanly - killing"

kill -KILL $(cat $PID)

else

echo "done"

fi

rm $PID

else

echo "No server runing ($PID is missing)"

fi

;;

restart)

$0 stop ; $0 start || exit 1

;;

status)

if [ -e $PID ]; then

if ( kill -0 $(cat $PID) 2> /dev/null ); then

echo "Server is running"

else

echo "Server seems to have died"

fi

else

echo "No server running ($PID is missing)"

fi

;;

*)

echo "Usage: ${0} {start|stop|restart|status}"

exit 2

esac

exit 0

startup normal

#!/bin/sh

# Copyright © 2013 www.codutility-france.fr

# All rights reserved

COMMANDLINE_PARAMETERS="./cod4_lnxded +set dedicated 2 +set net_port 28960 +set sv_punkbuster 0 set sv_maxclients 64 +set ui_maxclients 64 +exec server.cfg +map_rotate &"

BINARYNAME="cod4_lnxded"

BINARYPATH="/home/xxx/cod4_2"

cd "${BINARYPATH}"

LIBRARYPATH="$(pwd)"

PID=cod4_1.pid

case "$1" in

start)

if [ -e $PID ]; then

echo "$PID found, but no server running. Possibly your previously started server crashed"

rm $PID

fi

if [ "${UID}" = "0" ]; then

echo WARNING ! For security reasons we advise: DO NOT RUN THE SERVER AS ROOT

for c in $(seq 1 10); do

echo -n "!"

sleep 1

done

echo "!"

fi

echo "Starting the Call of Duty 4"

if [ -e "$BINARYNAME" ]; then

if [ ! -x "$BINARYNAME" ]; then

echo "${BINARYNAME} is not executable, trying to set it"

chmod u+x "${BINARYNAME}"

fi

if [ -x "$BINARYNAME" ]; then

export LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}"

nohup Xvfb :1 -screen 0 800x600x16 &

DISPLAY=localhost:1.0 nohup wine "./${BINARYNAME}" ${COMMANDLINE_PARAMETERS} > /dev/null &

echo $! > $PID

echo "Call of Duty 4 server started, for details please view the log file"

else

echo "${BINARNAME} is not exectuable, cannot start Call of Duty 4 server"

fi

else

echo "Could not find ${BINARYNAME}, aborting"

exit 5

fi

;;

stop)

if [ -e $PID ]; then

echo -n "Stopping the Call of Duty 4 server"

if ( kill -TERM $(cat $PID) 2> /dev/null ); then

for c in $(seq 1 300); do

if ( kill -0 $(cat $PID) 2> /dev/null ); then

echo -n "."

sleep 1

else

break

fi

done

fi

if ( kill -0 $(cat $PID) 2> /dev/null ); then

echo "Server is not shutting down cleanly - killing"

kill -KILL $(cat $PID)

else

echo "done"

fi

rm $PID

else

echo "No server runing ($PID is missing)"

fi

;;

restart)

$0 stop ; $0 start || exit 1

;;

status)

if [ -e $PID ]; then

if ( kill -0 $(cat $PID) 2> /dev/null ); then

echo "Server is running"

else

echo "Server seems to have died"

fi

else

echo "No server running ($PID is missing)"

fi

;;

*)

echo "Usage: ${0} {start|stop|restart|status}"

exit 2

esac

exit 0

command : server 1

cd /home/xxx/cod4_1

./cod4.sh start

./cod4.sh restart

./cod4.sh stop

server 2

cd /home/xxx/cod4_2

./cod4.sh start

./cod4.sh restart

./cod4.sh stop

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this