Search the Community

Showing results for tags 'startupscript'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Exile
    • Changelogs
    • Feedback
  • Exile Community
    • General Discussion
    • New Feature Voting
    • Problems & Bugs
    • Cat Walk
    • Recruitment
    • Small Talk
  • Exile Mod XM8 App
    • XM8 Server Administration
    • XM8 Android App
    • XM8 Discord Bot
  • Exile Mod Server Administration
    • Ask a Game Server Provider
    • Hosting
    • Operating Systems
    • Installation
    • Database
    • Security
    • Maintenance
  • Exile Mod Customization
    • Downloads & Releases
    • Content
    • Environment
    • Gameplay
    • Look & Feel
    • Tech Talk
  • Exile Life Mod
    • Visit forum on exilelifemod.com

Categories

  • Knowledge Base
  • Items
  • Constructions
  • Traders
  • Vehicles

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Homepage

Found 1 result

  1. SillymeX

    Debian 8.1 startup script issues

    Hello everyone, I'm currently using this startup script and occasionally it works fine but for majority of the time when I launch my server through it, it will say "server is already running" when it's not. Occasionally when it did that, I managed to find out that some mods were having issues which did not allow the server to start. After fixing the issues, the startup script worked again. This time its different. Firstly I tried running the script with only exile mod just to be sure that it's not an issue in the mods. It would still say "server is already running" which means that it's not a mod issue. Also I always check if it actually starts the server by doing the top command. Unfortunately, I don't have any processes running, yet it repeats "server is already running". It will not make any logs since the server is not actually up. As soon as I go to my a3 root folder and launch it with the parameters, the server loads up with all of the mods with no errors. I would appreciate a working solution to this. Here is the script that I use: #!/bin/bash ### BEGIN INIT INFO # Provides: exile # Required-Start: $remote_fs $network # Required-Stop: $remote_fs $network # Should-Start: mysql # Should-Stop: mysql # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: ArmA 3 Exile init.d Script by Flodding ### END INIT INFO #======================================================================= #======== CONFIGURATION PARAMETERS ======== #======== MUST BE EDITED MANUALLY TO FIT YOUR SYSTEM PARAMETERS ======== #======================================================================= USERNAME="pirkka" # This user *MUST* exist on the system. EXILE_DIR="/home/${USERNAME}/arma3/" # Change to your path... NAME="cfg" # You can use any name here, your server, or clan... CONFIGFOLDER="${EXILE_DIR}/${NAME}" CONFIG="${NAME}/config.cfg" # Remember to move config files from @exileserver/*.cfg to YOUR_INSTANCE_NAME/! CFG="${NAME}/basic.cfg" # Remember to move config files from @exileserver/*.cfg to YOUR_INSTANCE_NAME/! BEPATH="${EXILE_DIR}/battleye" LOG_DIR="${CONFIGFOLDER}/logs" PORT=2302 PIDFILE="${CONFIGFOLDER}/${PORT}.pid" if [ -f ${PIDFILE} ]; then RUNNING=1 PID=$(cat ${PIDFILE} > /dev/null) else RUNNING=0 fi SERVICE="arma3server" MODS="@exile" SERVERMOD="@exileserver" #CPU_COUNT=2 # Some common options # -ip=0.0.0.0 # -port=2302 (default) # -mod=@exile;kart;mark;heli; # -servermod=@exileserver # -config=C:\Arma\Server\@exileserver\config.cfg # -cfg=C:\Arma\Server\@exileserver\basic.cfg # -name=INSTANCE # -profiles=INSTANCE # -log # -nolog # -world=empty # -nosplash # -nosound # -nopause # -malloc=system -malloc=tbbmalloc # -autoinit OPTIONS="-port=${PORT} -pid=${PIDFILE} -name=${NAME} -profiles=${NAME} -cfg=${CFG} -config=${CONFIG} -mod=@Exile\;@AllInArmaTerrainPack\;@esseker\; -servermod=@ExileServer\;@infiSTAR_Exile\;@enigma_exile\; -log -nopause -nosound -nosplash -autoinit" TMUX_SESSION="exile" # You can use any name here. #======================================================================= # CONFIG END #======================================================================= TMUX=$(which tmux) [ ! -x "$TMUX" ] && echo "Tmux not found" >&2 && exit 1 if [ ! -d "$LOG_DIR" ]; then echo "${LOG_DIR} not found. Creating..." mkdir -p $LOG_DIR fi exile_start() { if [ ! -f $EXILE_DIR/$SERVICE ] then echo "$SERVICE not found! Stopping..." sleep 1 exit else if [ ${RUNNING} -eq 1 ]; then echo "$SERVICE is already running!" else echo "Setting Permissions..." #chmod -R 0755 $EXILE_DIR chown -R $USERNAME:$USERNAME /home/$USERNAME echo "Starting $SERVICE..." cd $EXILE_DIR # Fix: http://www.exilemod.com/topic/6054-linux-dedicated-server-setup-guide-debian-7/?do=findComment&comment=28274 find @exile/ -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \; find @exileserver/ -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \; if [ "${2}" == "-silent" ]; then su ${USERNAME} -c "${TMUX} new-session -d -s ${TMUX_SESSION} \"./${SERVICE} ${OPTIONS} > ${LOG_DIR}/exile.log 2> ${LOG_DIR}/errors.log\"" else su ${USERNAME} -c "${TMUX} new-session -d -s ${TMUX_SESSION} \"./${SERVICE} ${OPTIONS} 2> ${LOG_DIR}/errors.log | tee ${LOG_DIR}/exile.log\"" fi echo "Searching Process ${SERVICE}..." sleep 8 if pgrep -u $USERNAME -f $SERVICE > /dev/null then echo "$SERVICE is now running." RUNNING=1 else echo "Error! Could not start $SERVICE!" RUNNING=0 fi fi fi } exile_stop() { if [ ${RUNNING} -eq 1 ]; then echo "Stopping ${SERVICE}..." su $USERNAME -c "$TMUX kill-session -t $TMUX_SESSION" $TMUX kill-session -t $TMUX_SESSION killall -9 $SERVICE else echo "$SERVICE is stopped." fi if [ -f ${PIDFILE} ]; then rm -f ${PIDFILE} fi } exile_status() { if [ -f ${PIDFILE} ]; then PID=$(cat ${PIDFILE}) echo "Server is running (PID=${PID})..." else echo "Server not running..." exit 0 fi } case "$1" in start) exile_start ;; stop) exile_stop ;; restart) exile_stop exile_start ;; status) exile_status ;; attach) su $USERNAME -c "$TMUX at -t $TMUX_SESSION" ;; *) echo "$0 (start|stop|restart|status|attach)" exit 1 ;; esac exit 0