|
@@ -4,7 +4,7 @@
|
|
|
# Author: Daniel Gibbs
|
|
# Author: Daniel Gibbs
|
|
|
# Contributor: Scarsz
|
|
# Contributor: Scarsz
|
|
|
# Website: http://danielgibbs.co.uk
|
|
# Website: http://danielgibbs.co.uk
|
|
|
-# Version: 080914
|
|
|
|
|
|
|
+# Version: 100914
|
|
|
|
|
|
|
|
#### Variables ####
|
|
#### Variables ####
|
|
|
|
|
|
|
@@ -51,9 +51,9 @@ steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
|
|
|
|
|
|
|
|
# Server Details
|
|
# Server Details
|
|
|
servername=$(grep -s hostname "${servercfgfullpath}"|sed -e 's/\<hostname\>//g'| tr -d '=\"; ')
|
|
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
|
|
# Logging
|
|
|
logdays="7"
|
|
logdays="7"
|
|
@@ -189,18 +189,26 @@ fn_debugserver(){
|
|
|
fn_rootcheck
|
|
fn_rootcheck
|
|
|
fn_syscheck
|
|
fn_syscheck
|
|
|
fn_autoip
|
|
fn_autoip
|
|
|
|
|
+fn_distro
|
|
|
|
|
+fn_uptime
|
|
|
|
|
+fn_load
|
|
|
fn_parms
|
|
fn_parms
|
|
|
echo ""
|
|
echo ""
|
|
|
echo "${gamename} Debug"
|
|
echo "${gamename} Debug"
|
|
|
echo "============================"
|
|
echo "============================"
|
|
|
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 ""
|
|
|
echo "Start parameters:"
|
|
echo "Start parameters:"
|
|
|
echo ${parms}
|
|
echo ${parms}
|
|
|
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 ""
|
|
|
while true; do
|
|
while true; do
|
|
|
read -p "Continue? [y/N]" yn
|
|
read -p "Continue? [y/N]" yn
|
|
|
case $yn in
|
|
case $yn in
|
|
@@ -613,9 +621,9 @@ fn_arma3details(){
|
|
|
fn_autoip
|
|
fn_autoip
|
|
|
servername=$(grep -s hostname "${servercfgfullpath}"|sed -e 's/\<hostname\>//g'| tr -d '=\"; ')
|
|
servername=$(grep -s hostname "${servercfgfullpath}"|sed -e 's/\<hostname\>//g'| tr -d '=\"; ')
|
|
|
adminpass=$(grep -s passwordAdmin "${servercfgfullpath}"|sed -e 's/\<passwordAdmin\>//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)
|
|
pid=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
|
|
|
echo ""
|
|
echo ""
|
|
|
echo "${gamename} Server Details"
|
|
echo "${gamename} Server Details"
|
|
@@ -636,7 +644,7 @@ echo "UDP STEAM query port ${queryport}"
|
|
|
echo "UDP STEAM master traffic port ${masterport}"
|
|
echo "UDP STEAM master traffic port ${masterport}"
|
|
|
echo ""
|
|
echo ""
|
|
|
echo "You can change ports by editing the"
|
|
echo "You can change ports by editing the"
|
|
|
-echo "parameters in ${servercfgfullpath}."
|
|
|
|
|
|
|
+echo "parameters in ${servercfgfullpath}"
|
|
|
echo ""
|
|
echo ""
|
|
|
if [ "${pid}" == "0" ]; then
|
|
if [ "${pid}" == "0" ]; then
|
|
|
echo -e "Status:\e[0;31m OFFLINE\e[0;39m"
|
|
echo -e "Status:\e[0;31m OFFLINE\e[0;39m"
|
|
@@ -757,7 +765,7 @@ fn_retryinstall(){
|
|
|
while true; do
|
|
while true; do
|
|
|
read -p "Retry install? [y/N]" yn
|
|
read -p "Retry install? [y/N]" yn
|
|
|
case $yn in
|
|
case $yn in
|
|
|
- [Yy]* ) fn_install;;
|
|
|
|
|
|
|
+ [Yy]* ) fn_install; exit;;
|
|
|
[Nn]* ) echo Exiting; exit;;
|
|
[Nn]* ) echo Exiting; exit;;
|
|
|
* ) echo "Please answer yes or no.";;
|
|
* ) echo "Please answer yes or no.";;
|
|
|
esac
|
|
esac
|