Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Setting up run parameters under Linux

  1. #11
    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.
    Last edited by Killswitch; Jun 19 2012 at 07:33. Reason: spelling
    The confidence of ignorance will always overcome indecision of knowledge.

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

    Here is original arma2oaserver script

    Code:
    #!/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
    OTHERPARAMS=
    #=======================================================================
    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} ${OTHERPARAMS}
    	    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.
    Last edited by _MaSSive; Jun 19 2012 at 08:33.

  3. #13
    Rookie
    Join Date
    Jun 13 2012
    Location
    Рига, Latvia
    Posts
    6
    Author of the Thread
    thx i will try now

    Big thx _MaSSive and Killswitch, now all work properly
    Last edited by xAndrei; Jun 19 2012 at 09:17.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Setting up a Linux server
    By Wobbley in forum ARMA 2 & OA - Servers & Administration
    Replies: 13
    Last Post: May 5 2011, 17:18
  2. Setting up mission parameters for good !
    By Slowest in forum ARMA 2 & OA : ADDONS - Configs & Scripting
    Replies: 4
    Last Post: Jul 9 2010, 10:44
  3. Setting Parameters in server.cfg
    By Hellfire21 in forum ARMA 2 & OA - MULTIPLAYER
    Replies: 7
    Last Post: Oct 23 2009, 16:55
  4. Setting the player's view parameters
    By Rejenorst in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 1
    Last Post: Aug 30 2009, 03:49
  5. Setting Up the LInux Server
    By Bertie Bott in forum TROUBLESHOOTING
    Replies: 1
    Last Post: Jan 30 2006, 08:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •