Browse Source

minor bug fixes and improvement to debug mode

pull/173/head
Daniel Gibbs 11 years ago
parent
commit
db8255e2d1
  1. 32
      Arma3/arma3server

32
Arma3/arma3server

@ -4,7 +4,7 @@
# Author: Daniel Gibbs
# Contributor: Scarsz
# Website: http://danielgibbs.co.uk
# Version: 080914
# Version: 100914
#### Variables ####
@ -51,9 +51,9 @@ steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details
servername=$(grep -s hostname "${servercfgfullpath}"|sed -e 's/\<hostname\>//g'| tr -d '=\"; ')
serverport=$(sed -n -e '10 p' $servercfgfullpath | sed 's/[\/\; ]//g' | tr -cd [:digit:])
queryport=$(sed -n -e '14 p' $servercfgfullpath | sed 's/[\/\; ]//g' | tr -cd [:digit:])
masterport=$(sed -n -e '12 p' $servercfgfullpath | sed 's/[\/\; ]//g' | tr -cd [:digit:])
serverport=$(sed -n -e '10 p' ${servercfgfullpath} 2>/dev/null| sed 's/[\/\; ]//g' | tr -cd [:digit:])
queryport=$(sed -n -e '14 p' ${servercfgfullpath} 2>/dev/null| sed 's/[\/\; ]//g' | tr -cd [:digit:])
masterport=$(sed -n -e '12 p' ${servercfgfullpath} 2>/dev/null| sed 's/[\/\; ]//g' | tr -cd [:digit:])
# Logging
logdays="7"
@ -189,18 +189,26 @@ fn_debugserver(){
fn_rootcheck
fn_syscheck
fn_autoip
fn_distro
fn_uptime
fn_load
fn_parms
echo ""
echo "${gamename} Debug"
echo "============================"
echo ""
echo -e "Use for identifying server issues only!"
echo -e "Press CTRL+c to drop out of debug mode"
echo -e "\e[0;31mWARNING!\e[0;39m If ${servicename} is already running it will be stopped"
echo -e "Distro: ${os}"
echo -e "Arch: ${arch}"
echo -e "Kernel: ${kernel}"
echo -e "Hostname: $HOSTNAME"
echo ""
echo "Start parameters:"
echo ${parms}
echo ""
echo -e "Use for identifying server issues only!"
echo -e "Press CTRL+c to drop out of debug mode"
echo -e "\e[0;31mWARNING!\e[0;39m If ${servicename} is already running it will be stopped"
echo ""
while true; do
read -p "Continue? [y/N]" yn
case $yn in
@ -613,9 +621,9 @@ fn_arma3details(){
fn_autoip
servername=$(grep -s hostname "${servercfgfullpath}"|sed -e 's/\<hostname\>//g'| tr -d '=\"; ')
adminpass=$(grep -s passwordAdmin "${servercfgfullpath}"|sed -e 's/\<passwordAdmin\>//g'|tr -d '=\"; ')
serverport=$(sed -n -e '10 p' $servercfgfullpath | sed 's/[\/\; ]//g' | tr -cd [:digit:])
queryport=$(sed -n -e '14 p' $servercfgfullpath | sed 's/[\/\; ]//g' | tr -cd [:digit:])
masterport=$(sed -n -e '12 p' $servercfgfullpath | sed 's/[\/\; ]//g' | tr -cd [:digit:])
serverport=$(sed -n -e '10 p' ${servercfgfullpath} | sed 's/[\/\; ]//g' | tr -cd [:digit:])
queryport=$(sed -n -e '14 p' ${servercfgfullpath} | sed 's/[\/\; ]//g' | tr -cd [:digit:])
masterport=$(sed -n -e '12 p' ${servercfgfullpath} | sed 's/[\/\; ]//g' | tr -cd [:digit:])
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
echo ""
echo "${gamename} Server Details"
@ -636,7 +644,7 @@ echo "UDP STEAM query port ${queryport}"
echo "UDP STEAM master traffic port ${masterport}"
echo ""
echo "You can change ports by editing the"
echo "parameters in ${servercfgfullpath}."
echo "parameters in ${servercfgfullpath}"
echo ""
if [ "${pid}" == "0" ]; then
echo -e "Status:\e[0;31m OFFLINE\e[0;39m"
@ -757,7 +765,7 @@ fn_retryinstall(){
while true; do
read -p "Retry install? [y/N]" yn
case $yn in
[Yy]* ) fn_install;;
[Yy]* ) fn_install; exit;;
[Nn]* ) echo Exiting; exit;;
* ) echo "Please answer yes or no.";;
esac

Loading…
Cancel
Save