Jump to content
Sign in to follow this  
xandrei

Setting up run parameters under Linux

Recommended Posts

How to add run parameters in arma2server file

#=======================================================================
#========               CONFIGURATION PARAMETERS                ========
#======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ========
#=======================================================================
ARMA_DIR=/home/
CONFIG=server.cfg
PORT=2302
PIDFILE=${ARMA_DIR}/${PORT}.pid
RUNFILE=${ARMA_DIR}/${PORT}.run
LOGFILE=${ARMA_DIR}/log.${PORT}.txt
SERVER=${ARMA_DIR}/server
#=======================================================================

i need add: -world=empty -BEpath=/home/battleye/ -netlog

-profiles=/home/arma2lv/ -name=arma2lv -cfg=basic.cfg -port=2302 -maxplayers=30 -maxmem=2048

Share this post


Link to post
Share on other sites

Is this what you have posted original startup script or modified one?

For original script it should have a line

OTHERPARAMS='-parameter=1 -parameter=2 -parameter=etc'

Share this post


Link to post
Share on other sites
Is this what you have posted original startup script or modified one?

For original script it should have a line

OTHERPARAMS='-parameter=1 -parameter=2 -parameter=etc'

i post default script, i change only ARMA_DIR

i was try to use OTHERPARAMS= but i forgot to put '' i will try with '' now

PS. one more questions. what files need be in battleye directory?

Share this post


Link to post
Share on other sites
i post default script, i change only ARMA_DIR

i was try to use OTHERPARAMS= but i forgot to put '' i will try with '' now

PS. one more questions. what files need be in battleye directory?

Hmm which version of server you use?

In BE direcory you need beserver.so

~/arma2/expansion/battleye$ ls
beserver_active_37656628.cfg  beserver.so

If you use just Arma2 but not Arrowhead, you need this file in /arma2/battleye

http://www.battleye.com/download.html

Share this post


Link to post
Share on other sites

i use last version of just Arma2

beserver_active_37656628.cfg file i need make my self? with rcon password?

---------- Post added at 00:03 ---------- Previous post was at 23:01 ----------

big thx _MaSSive all work like a charm

only got one problem -netlog don't make log file

Edited by xAndrei

Share this post


Link to post
Share on other sites
i use last version of just Arma2

beserver_active_37656628.cfg file i need make my self? with rcon password?

---------- Post added at 00:03 ---------- Previous post was at 23:01 ----------

big thx _MaSSive all work like a charm

only got one problem -netlog don't make log file

Disregard beserver_active_37656628.cfg its generated by BE on my setup.

Look here its all you need to know about BE.

Netlog - http://community.bistudio.com/wiki/ArmA:_Server_configuration

Edited by _MaSSive

Share this post


Link to post
Share on other sites

-netlog still don't make log file

my parametere line

ARMA_DIR=/home/arma-server/server/
CONFIG=server.cfg
PORT=2302
PIDFILE=${ARMA_DIR}/${PORT}.pid
RUNFILE=${ARMA_DIR}/${PORT}.run
LOGFILE=${ARMA_DIR}/log.${PORT}.txt
SERVER=${ARMA_DIR}/server
OTHERPARAMS='-netlog -name=arma2lv -profiles=/home/arma-server/server/arma2lv/ -cfg=basic.cfg -BEpath=/home/arma-server/server/battleye/'

Share this post


Link to post
Share on other sites

Im running -netlog and I have it in my server root. File is called net.log

Try placing switch at the end of the line like this

OTHERPARAMS='-name=arma2lv -profiles=/home/arma-server/server/arma2lv/ -cfg=basic.cfg -BEpath=/home/arma-server/server/battleye/ -netlog'

And why do you have -BEpath set to deafult BE? This is needed only if you run BE from custom location, but if your server root is /home/arma-server/server/ then ..server/battleye/ is default location and no need for -BEpath switch.

Can you please post output of ps aux | grep server while your server is running?

Edited by _MaSSive

Share this post


Link to post
Share on other sites

Can you please post output of ps aux | grep server while your server is running?

psaux.jpg

i run ./arma2server start from etc/rc.d/init.d directory

Share this post


Link to post
Share on other sites

Somethings wrong there. Your launch parmaters are not used at all. Here is mine

2$ ps aux | grep server
massive   4044  0.0  0.0  10132   840 pts/0    S+   08:28   0:00 grep server
massive   8008  0.0  0.0  13212  1440 ?        S    Jun18   0:00 /bin/bash ./arma2oaserver watchdog
massive   8010 24.7  5.0 868728 829428 ?       Sl   Jun18 477:43 /home/massive/arma2/server2/server -server -config=ace2srv.cfg -port=2433 -pid=/home/massive/arma2/server2/2433.pid -mod=ca;expansion;expansion/beta;expansion/beta/expansion;@cba;@cba_a2;@cba_oa;@server; -cfg=arma2oa.cfg -cpucount=4 -exthreads=7 -netlog

I run it from server folder. This is my OTHERPARAMS line

OTHERPARAMS='-cfg=arma2oa.cfg -cpucount=4 -exthreads=7 -netlog'

My script is a bit custom wouldnt want to confuse you with it, and I run CO server. If you haven't used OTHERPARAMS there when you launched it then its ok, but if you did its not working for some reason.

Post you complete arma2server script.

Share this post


Link to post
Share on other sites

Actually, the Linux Arma 2 launch script, "arma2server" does not have OTHERPARAMS like arma2oaserver has, so that's why "it doesn't work".

Solution: extract the arma2oaserver script from one of the Linux Arma 2 OA server archives and use that to launch the Arma 2 server or modify the stock arma2server script so that it makes use of OTHERPARAMS.

Edited by Killswitch
spelling

Share this post


Link to post
Share on other sites

Well I apologize I didnt knew that. It sure needs to be fixed and arma2server script updated.

Here is original arma2oaserver script

#!/bin/bash
#
# armaserver: ArmA 2 Linux Dedicated Server Control Script
#  (c) 2010 BIStudio
#  ArmA 2 binary version must be 1.04 or later
#

#=======================================================================
#========               CONFIGURATION PARAMETERS                ========
#======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ========
#=======================================================================
ARMA_DIR=
CONFIG=server.cfg
PORT=2302
PIDFILE=${ARMA_DIR}/${PORT}.pid
RUNFILE=${ARMA_DIR}/${PORT}.run
LOGFILE=${ARMA_DIR}/log.${PORT}.txt
SERVER=${ARMA_DIR}/server
[color="#FF0000"]OTHERPARAMS=[/color]
#=======================================================================
ulimit -c 1000000

case "$1" in


   start)
if [ -f ${RUNFILE} ]; then
    $0 stop
fi
echo "Starting ArmA 2 server..."
# file to mark we want server running...	
echo "go" >${RUNFILE}
# launch the background watchdog process to run the server
nohup </dev/null >/dev/null $0 watchdog &
;;

   stop)
echo "Stopping ArmA 2 server..."
if [ -f ${RUNFILE} ]; then
# ask watcher process to exit by deleting its runfile...
    rm -f ${RUNFILE}
fi
# and terminate ArmA 2 server process
if [ -f ${PIDFILE} ]; then
    kill -TERM $(< ${PIDFILE})
    if [ -f ${PIDFILE} ]; then
	rm -f ${PIDFILE}
    fi
fi
;;


   status)
if [ -f ${RUNFILE} ]; then
    echo "Server should be running..."
else
    echo "Server should not be running..."
fi
if [ -f ${PIDFILE} ]; then
    PID=$(< ${PIDFILE})
    echo "PID file exists (PID=${PID})..."
    if [ -f /proc/${PID}/cmdline ]; then
	echo "Server process seems to be running..."
    fi
fi
;;


   check)
echo -n "ArmA 2 directory: ${ARMA_DIR} "
if [ -d ${ARMA_DIR} ]; then
    echo "OK"
else
    echo "MISSING!"
fi

echo -n "Server executable: ${SERVER} "
if [ -x ${SERVER} ]; then
    echo "OK"
else
    echo "ERROR!"
fi

echo "Port number: ${PORT}"

echo -n "Config file: ${CONFIG} "
if [ -f ${CONFIG} ]; then
    echo "OK"
else
    echo "MISSING!"
fi

echo "PID file: ${PIDFILE}"
echo "RUN file: ${RUNFILE}"

;;

   restart)
$0 stop
$0 start
       ;;

   watchdog)
# this is a background watchdog process. Do not start directly
while [ -f ${RUNFILE} ]; do
# launch the server...
    cd ${ARMA_DIR}
    echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Starting server (port ${PORT})..."
    ${SERVER} >>${LOGFILE} 2>&1 -server -config=${CONFIG} -port=${PORT} -pid=${PIDFILE}[color="#FF0000"] ${OTHERPARAMS}[/color]
    if [ -f ${RUNFILE} ]; then
	echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server died, waiting to restart..."
	sleep 5s
    else
	echo >>${LOGFILE} "WATCHDOG ($$): [$(date)] Server shutdown intentional, watchdog terminating"
    fi
done    
;;
   *)
echo "$0 (start|stop|restart|status|check)"
;;
esac

Save it to your script and edit parameters and youre good to go. Actually those marked in red are only difference to one you have but check to be sure.

Edited by _MaSSive

Share this post


Link to post
Share on other sites

thx i will try now

Big thx _MaSSive and Killswitch, now all work properly

Edited by xAndrei

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×