Browse Source

GLIBC fix and autoip update

Created a global function for glibc fixes. Will detect GLIBC version and
game server to apply a fix as needed.

Update fn_autoip to ignore entire 127.0.0.0 range

/dependency hell
pull/175/head
Daniel Gibbs 11 years ago
parent
commit
ff773b87cc
  1. 124
      Arma3/arma3server
  2. 141
      BladeSymphony/bsserver
  3. 131
      FistfulOfFrags/fofserver
  4. 136
      GarrysMod/gmodserver
  5. 131
      Insurgency/insserver
  6. 134
      NaturalSelection2/ns2server
  7. 131
      NoMoreRoomInHell/nmrihserver

124
Arma3/arma3server

@ -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: 100914 # Version: 200914
#### Variables #### #### Variables ####
@ -138,8 +138,8 @@ fi
fn_autoip(){ fn_autoip(){
# Identifies the server interface IP # Identifies the server interface IP
# If multiple interfaces this will need to be set manually # If multiple interfaces this will need to be set manually
getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1) getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1|wc -l) getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0|wc -l)
if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
if [ "${getipwc}" -ge "2" ]; then if [ "${getipwc}" -ge "2" ]; then
fn_printwarn "Multiple active network interfaces.\n\n" fn_printwarn "Multiple active network interfaces.\n\n"
@ -658,13 +658,112 @@ echo ""
## Installer ## Installer
# #
fn_arma3deps(){ fn_glibcfix(){
echo "Copying libstdc++.so.6" if [ -z $(command -v ldd) ]; then
echo "=================================" echo ""
sleep 1 echo -e "\r\033[K\e[0;31mFAIL\e[0;39m GLIBC is not detected."
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6" sleep 1
sleep 1 echo "Install GLIBC and retry installation"
echo "" sleep 1
echo ""
while true; do
read -p "Continue install? [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; exit;;
* ) echo "Please answer yes or no.";;
esac
done
elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215 ]; then
echo "GLIBC Fix required"
echo "============================"
sleep 1
echo -e "\e[0;31mWARNING!\e[0;39m ${gamename} requires GLIBC_2.15 or above"
sleep 1
echo ""
echo "Currently installed: GLIBC_$(ldd --version |grep ldd|awk '{print $NF}')"
echo "Required: => GLIBC_2.15"
echo ""
sleep 1
echo "The installer will now detect and download the required files to allow ${gamename} server to run on a distro with GLIBC_2.14 or less."
echo "note: This will NOT upgrade GLIBC on your system"
sleep 1
echo ""
echo "Downloading Required files"
echo "================================="
sleep 1
if [ "${gamename}" == "Insurgency" ];then
echo "Detected Insurgency"
sleep 1
echo "Downloading files for Insurgency GLIBC Fix"
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/librt.so.1
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libpthread.so.0
sleep 1
elif [ "${gamename}" == "Garrys's Mod" ];then
echo "Detected Garrys's Mod"
sleep 1
echo "Downloading files for Garrys's Mod GLIBC Fix"
sleep 1
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libm.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libpthread.so.0
cp -v "${filesdir}/bin/libsteam.so" "${HOME}/.steam/sdk32/libsteam.so"
echo ""
elif [ "${gamename}" == "Natural Selection 2" ];then
echo "Detected Natural Selection 2"
sleep 1
echo "Downloading files for Natural Selection 2 GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "No More Room in Hell" ];then
echo "Detected No More Room in Hell"
sleep 1
echo "Downloading files for No More Room in Hell GLIBC Fix"
sleep 1
cd "${filesdir}/srcds"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NoMoreRoomInHell/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/srcds/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Blade Symphony" ];then
echo "Detected Blade Symphony"
sleep 1
echo "Downloading files for Blade Symphony GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Fistful of Frags" ];then
echo "Detected Fistful of Frags"
sleep 1
echo "Downloading files for Fistful of Frags GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/FistfulOfFrags/dependencies/libm.so.6
sleep 1
echo ""
elif [ "${gamename}" == "ARMA 3" ];then
echo "Detected ARMA 3"
sleep 1
echo "Downloading files for ARMA 3 GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
else
echo "error: Unable to detect game. Fix not applied"
fi
echo "GLIBC fix has been applied!"
sleep 1
echo ""
fi
} }
fn_arma3config(){ fn_arma3config(){
@ -699,7 +798,7 @@ mkdir -pv "steamcmd"
sleep 1 sleep 1
cd "steamcmd" cd "steamcmd"
if [ ! -f steamcmd.sh ]; then if [ ! -f steamcmd.sh ]; then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz wget -nv -N http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz rm -v steamcmd_linux.tar.gz
chmod +x steamcmd.sh chmod +x steamcmd.sh
@ -738,7 +837,7 @@ echo "================================="
sleep 1 sleep 1
mkdir -pv "${HOME}/.steam" mkdir -pv "${HOME}/.steam"
mkdir -pv "${HOME}/.steam/sdk32" mkdir -pv "${HOME}/.steam/sdk32"
cp -v "${steamclient}" "${HOME}/.steam/sdk32/steamclient.so" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so"
sleep 1 sleep 1
echo "" echo ""
} }
@ -804,6 +903,7 @@ fn_steamdl
fn_steaminstall fn_steaminstall
fn_steamfix fn_steamfix
fn_loginstall fn_loginstall
fn_glibcfix
fn_arma3deps fn_arma3deps
fn_arma3config fn_arma3config
sleep 1 sleep 1

141
BladeSymphony/bsserver

@ -3,7 +3,7 @@
# Server Management Script # Server Management Script
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 100914 # Version: 200914
#### Variables #### #### Variables ####
@ -52,7 +52,6 @@ servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}" servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg" defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups" backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details # Server Details
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g') servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
@ -141,8 +140,8 @@ fi
fn_autoip(){ fn_autoip(){
# Identifies the server interface IP # Identifies the server interface IP
# If multiple interfaces this will need to be set manually # If multiple interfaces this will need to be set manually
getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1) getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1|wc -l) getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0|wc -l)
if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
if [ "${getipwc}" -ge "2" ]; then if [ "${getipwc}" -ge "2" ]; then
fn_printwarn "Multiple active network interfaces.\n\n" fn_printwarn "Multiple active network interfaces.\n\n"
@ -659,13 +658,112 @@ echo ""
## Installer ## Installer
# #
fn_bsdeps(){ fn_glibcfix(){
echo "Copying libstdc++.so.6" if [ -z $(command -v ldd) ]; then
echo "=================================" echo ""
sleep 1 echo -e "\r\033[K\e[0;31mFAIL\e[0;39m GLIBC is not detected."
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6" sleep 1
sleep 1 echo "Install GLIBC and retry installation"
echo "" sleep 1
echo ""
while true; do
read -p "Continue install? [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; exit;;
* ) echo "Please answer yes or no.";;
esac
done
elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215 ]; then
echo "GLIBC Fix required"
echo "============================"
sleep 1
echo -e "\e[0;31mWARNING!\e[0;39m ${gamename} requires GLIBC_2.15 or above"
sleep 1
echo ""
echo "Currently installed: GLIBC_$(ldd --version |grep ldd|awk '{print $NF}')"
echo "Required: => GLIBC_2.15"
echo ""
sleep 1
echo "The installer will now detect and download the required files to allow ${gamename} server to run on a distro with GLIBC_2.14 or less."
echo "note: This will NOT upgrade GLIBC on your system"
sleep 1
echo ""
echo "Downloading Required files"
echo "================================="
sleep 1
if [ "${gamename}" == "Insurgency" ];then
echo "Detected Insurgency"
sleep 1
echo "Downloading files for Insurgency GLIBC Fix"
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/librt.so.1
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libpthread.so.0
sleep 1
elif [ "${gamename}" == "Garrys's Mod" ];then
echo "Detected Garrys's Mod"
sleep 1
echo "Downloading files for Garrys's Mod GLIBC Fix"
sleep 1
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libm.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libpthread.so.0
cp -v "${filesdir}/bin/libsteam.so" "${HOME}/.steam/sdk32/libsteam.so"
echo ""
elif [ "${gamename}" == "Natural Selection 2" ];then
echo "Detected Natural Selection 2"
sleep 1
echo "Downloading files for Natural Selection 2 GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "No More Room in Hell" ];then
echo "Detected No More Room in Hell"
sleep 1
echo "Downloading files for No More Room in Hell GLIBC Fix"
sleep 1
cd "${filesdir}/srcds"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NoMoreRoomInHell/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/srcds/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Blade Symphony" ];then
echo "Detected Blade Symphony"
sleep 1
echo "Downloading files for Blade Symphony GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Fistful of Frags" ];then
echo "Detected Fistful of Frags"
sleep 1
echo "Downloading files for Fistful of Frags GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/FistfulOfFrags/dependencies/libm.so.6
sleep 1
echo ""
elif [ "${gamename}" == "ARMA 3" ];then
echo "Detected ARMA 3"
sleep 1
echo "Downloading files for ARMA 3 GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
else
echo "error: Unable to detect game. Fix not applied"
fi
echo "GLIBC fix has been applied!"
sleep 1
echo ""
fi
} }
fn_header(){ fn_header(){
@ -687,7 +785,7 @@ mkdir -pv "steamcmd"
sleep 1 sleep 1
cd "steamcmd" cd "steamcmd"
if [ ! -f steamcmd.sh ]; then if [ ! -f steamcmd.sh ]; then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz wget -nv -N http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz rm -v steamcmd_linux.tar.gz
chmod +x steamcmd.sh chmod +x steamcmd.sh
@ -726,7 +824,7 @@ echo "================================="
sleep 1 sleep 1
mkdir -pv "${HOME}/.steam" mkdir -pv "${HOME}/.steam"
mkdir -pv "${HOME}/.steam/sdk32" mkdir -pv "${HOME}/.steam/sdk32"
cp -v "${steamclient}" "${HOME}/.steam/sdk32/steamclient.so" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so"
sleep 1 sleep 1
echo "" echo ""
} }
@ -749,6 +847,20 @@ sleep 1
echo "" echo ""
} }
fn_getquery(){
echo "GameServerQuery"
echo "============================"
while true; do
read -p "Do you want to install GameServerQuery? [y/N]" yn
case $yn in
[Yy]* ) wget -nv -N "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;;
[Nn]* ) echo -e "Not installing GameServerQuery.";break;;
* ) echo "Please answer yes or no.";;
esac
done
echo ""
}
fn_retryinstall(){ fn_retryinstall(){
while true; do while true; do
read -p "Retry install? [y/N]" yn read -p "Retry install? [y/N]" yn
@ -792,7 +904,8 @@ fn_steamdl
fn_steaminstall fn_steaminstall
fn_steamfix fn_steamfix
fn_loginstall fn_loginstall
fn_bsdeps fn_getquery
fn_glibcfix
echo "Configuring ${gamename} Server" echo "Configuring ${gamename} Server"
echo "=================================" echo "================================="
sleep 1 sleep 1

131
FistfulOfFrags/fofserver

@ -3,7 +3,7 @@
# Server Management Script # Server Management Script
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 170914 # Version: 200914
#### Variables #### #### Variables ####
@ -52,7 +52,6 @@ servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}" servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg" defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups" backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details # Server Details
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g') servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
@ -141,8 +140,8 @@ fi
fn_autoip(){ fn_autoip(){
# Identifies the server interface IP # Identifies the server interface IP
# If multiple interfaces this will need to be set manually # If multiple interfaces this will need to be set manually
getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1) getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1|wc -l) getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0|wc -l)
if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
if [ "${getipwc}" -ge "2" ]; then if [ "${getipwc}" -ge "2" ]; then
fn_printwarn "Multiple active network interfaces.\n\n" fn_printwarn "Multiple active network interfaces.\n\n"
@ -212,9 +211,6 @@ echo -e "Use for identifying server issues only!"
echo -e "Press CTRL+c to drop out of debug mode" 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 "\e[0;31mWARNING!\e[0;39m If ${servicename} is already running it will be stopped"
echo "" echo ""
echo "Start parameters:"
echo ${parms}
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
@ -662,13 +658,112 @@ echo ""
## Installer ## Installer
# #
fn_fofdeps(){ fn_glibcfix(){
echo "Downloading libm.so.6" if [ -z $(command -v ldd) ]; then
echo "=================================" echo ""
cd "${filesdir}" echo -e "\r\033[K\e[0;31mFAIL\e[0;39m GLIBC is not detected."
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/FistfulOfFrags/dependencies/libm.so.6 sleep 1
sleep 1 echo "Install GLIBC and retry installation"
echo "" sleep 1
echo ""
while true; do
read -p "Continue install? [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; exit;;
* ) echo "Please answer yes or no.";;
esac
done
elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215 ]; then
echo "GLIBC Fix required"
echo "============================"
sleep 1
echo -e "\e[0;31mWARNING!\e[0;39m ${gamename} requires GLIBC_2.15 or above"
sleep 1
echo ""
echo "Currently installed: GLIBC_$(ldd --version |grep ldd|awk '{print $NF}')"
echo "Required: => GLIBC_2.15"
echo ""
sleep 1
echo "The installer will now detect and download the required files to allow ${gamename} server to run on a distro with GLIBC_2.14 or less."
echo "note: This will NOT upgrade GLIBC on your system"
sleep 1
echo ""
echo "Downloading Required files"
echo "================================="
sleep 1
if [ "${gamename}" == "Insurgency" ];then
echo "Detected Insurgency"
sleep 1
echo "Downloading files for Insurgency GLIBC Fix"
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/librt.so.1
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libpthread.so.0
sleep 1
elif [ "${gamename}" == "Garrys's Mod" ];then
echo "Detected Garrys's Mod"
sleep 1
echo "Downloading files for Garrys's Mod GLIBC Fix"
sleep 1
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libm.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libpthread.so.0
cp -v "${filesdir}/bin/libsteam.so" "${HOME}/.steam/sdk32/libsteam.so"
echo ""
elif [ "${gamename}" == "Natural Selection 2" ];then
echo "Detected Natural Selection 2"
sleep 1
echo "Downloading files for Natural Selection 2 GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "No More Room in Hell" ];then
echo "Detected No More Room in Hell"
sleep 1
echo "Downloading files for No More Room in Hell GLIBC Fix"
sleep 1
cd "${filesdir}/srcds"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NoMoreRoomInHell/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/srcds/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Blade Symphony" ];then
echo "Detected Blade Symphony"
sleep 1
echo "Downloading files for Blade Symphony GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Fistful of Frags" ];then
echo "Detected Fistful of Frags"
sleep 1
echo "Downloading files for Fistful of Frags GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/FistfulOfFrags/dependencies/libm.so.6
sleep 1
echo ""
elif [ "${gamename}" == "ARMA 3" ];then
echo "Detected ARMA 3"
sleep 1
echo "Downloading files for ARMA 3 GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
else
echo "error: Unable to detect game. Fix not applied"
fi
echo "GLIBC fix has been applied!"
sleep 1
echo ""
fi
} }
fn_header(){ fn_header(){
@ -690,7 +785,7 @@ mkdir -pv "steamcmd"
sleep 1 sleep 1
cd "steamcmd" cd "steamcmd"
if [ ! -f steamcmd.sh ]; then if [ ! -f steamcmd.sh ]; then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz wget -nv -N http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz rm -v steamcmd_linux.tar.gz
chmod +x steamcmd.sh chmod +x steamcmd.sh
@ -729,7 +824,7 @@ echo "================================="
sleep 1 sleep 1
mkdir -pv "${HOME}/.steam" mkdir -pv "${HOME}/.steam"
mkdir -pv "${HOME}/.steam/sdk32" mkdir -pv "${HOME}/.steam/sdk32"
cp -v "${steamclient}" "${HOME}/.steam/sdk32/steamclient.so" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so"
sleep 1 sleep 1
echo "" echo ""
} }
@ -758,7 +853,7 @@ fn_getquery(){
while true; do while true; do
read -p "Do you want to install GameServerQuery? [y/N]" yn read -p "Do you want to install GameServerQuery? [y/N]" yn
case $yn in case $yn in
[Yy]* ) wget -nv "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;; [Yy]* ) wget -nv -N "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;;
[Nn]* ) echo -e "Not installing GameServerQuery.";break;; [Nn]* ) echo -e "Not installing GameServerQuery.";break;;
* ) echo "Please answer yes or no.";; * ) echo "Please answer yes or no.";;
esac esac
@ -810,7 +905,7 @@ fn_steaminstall
fn_steamfix fn_steamfix
fn_loginstall fn_loginstall
fn_getquery fn_getquery
fn_fofdeps fn_glibcfix
echo "Configuring ${gamename} Server" echo "Configuring ${gamename} Server"
echo "=================================" echo "================================="
sleep 1 sleep 1

136
GarrysMod/gmodserver

@ -3,7 +3,7 @@
# Server Management Script # Server Management Script
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 170914 # Version: 200914
#### Variables #### #### Variables ####
@ -57,7 +57,6 @@ servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}" servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg" defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups" backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details # Server Details
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g') servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
@ -146,8 +145,8 @@ fi
fn_autoip(){ fn_autoip(){
# Identifies the server interface IP # Identifies the server interface IP
# If multiple interfaces this will need to be set manually # If multiple interfaces this will need to be set manually
getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1) getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1|wc -l) getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0|wc -l)
if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
if [ "${getipwc}" -ge "2" ]; then if [ "${getipwc}" -ge "2" ]; then
fn_printwarn "Multiple active network interfaces.\n\n" fn_printwarn "Multiple active network interfaces.\n\n"
@ -664,33 +663,110 @@ echo ""
## Installer ## Installer
# #
fn_gmoddeps(){ fn_glibcfix(){
echo "Copying libstdc++.so.6"
echo "================================="
sleep 1
cd "${filesdir}"
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}"
sleep 1
echo ""
if [ -z $(command -v ldd) ]; then if [ -z $(command -v ldd) ]; then
echo "GLIBC is not installed." echo ""
echo "Downloading required files for GLIBC" echo -e "\r\033[K\e[0;31mFAIL\e[0;39m GLIBC is not detected."
echo "=================================" sleep 1
echo "Install GLIBC and retry installation"
sleep 1 sleep 1
cd "${filesdir}"/bin
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libc.so.6
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libm.so.6
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libpthread.so.0
echo "" echo ""
while true; do
read -p "Continue install? [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; exit;;
* ) echo "Please answer yes or no.";;
esac
done
elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215 ]; then elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215 ]; then
echo "Outdated GLIBC version '$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)'" echo "GLIBC Fix required"
echo "Downloading updated files" echo "============================"
sleep 1
echo -e "\e[0;31mWARNING!\e[0;39m ${gamename} requires GLIBC_2.15 or above"
sleep 1
echo ""
echo "Currently installed: GLIBC_$(ldd --version |grep ldd|awk '{print $NF}')"
echo "Required: => GLIBC_2.15"
echo ""
sleep 1
echo "The installer will now detect and download the required files to allow ${gamename} server to run on a distro with GLIBC_2.14 or less."
echo "note: This will NOT upgrade GLIBC on your system"
sleep 1
echo ""
echo "Downloading Required files"
echo "=================================" echo "================================="
sleep 1 sleep 1
cd "${filesdir}"/bin if [ "${gamename}" == "Insurgency" ];then
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libc.so.6 echo "Detected Insurgency"
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libm.so.6 sleep 1
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libpthread.so.0 echo "Downloading files for Insurgency GLIBC Fix"
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/librt.so.1
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libpthread.so.0
sleep 1
elif [ "${gamename}" == "Garrys's Mod" ];then
echo "Detected Garrys's Mod"
sleep 1
echo "Downloading files for Garrys's Mod GLIBC Fix"
sleep 1
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libm.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libpthread.so.0
cp -v "${filesdir}/bin/libsteam.so" "${HOME}/.steam/sdk32/libsteam.so"
echo ""
elif [ "${gamename}" == "Natural Selection 2" ];then
echo "Detected Natural Selection 2"
sleep 1
echo "Downloading files for Natural Selection 2 GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "No More Room in Hell" ];then
echo "Detected No More Room in Hell"
sleep 1
echo "Downloading files for No More Room in Hell GLIBC Fix"
sleep 1
cd "${filesdir}/srcds"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NoMoreRoomInHell/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/srcds/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Blade Symphony" ];then
echo "Detected Blade Symphony"
sleep 1
echo "Downloading files for Blade Symphony GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Fistful of Frags" ];then
echo "Detected Fistful of Frags"
sleep 1
echo "Downloading files for Fistful of Frags GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/FistfulOfFrags/dependencies/libm.so.6
sleep 1
echo ""
elif [ "${gamename}" == "ARMA 3" ];then
echo "Detected ARMA 3"
sleep 1
echo "Downloading files for ARMA 3 GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
else
echo "error: Unable to detect game. Fix not applied"
fi
echo "GLIBC fix has been applied!"
sleep 1
echo "" echo ""
fi fi
} }
@ -714,7 +790,7 @@ mkdir -pv "steamcmd"
sleep 1 sleep 1
cd "steamcmd" cd "steamcmd"
if [ ! -f steamcmd.sh ]; then if [ ! -f steamcmd.sh ]; then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz wget -nv -N http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz rm -v steamcmd_linux.tar.gz
chmod +x steamcmd.sh chmod +x steamcmd.sh
@ -753,7 +829,7 @@ echo "================================="
sleep 1 sleep 1
mkdir -pv "${HOME}/.steam" mkdir -pv "${HOME}/.steam"
mkdir -pv "${HOME}/.steam/sdk32" mkdir -pv "${HOME}/.steam/sdk32"
cp -v "${steamclient}" "${HOME}/.steam/sdk32/steamclient.so" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so"
sleep 1 sleep 1
echo "" echo ""
} }
@ -782,7 +858,7 @@ fn_getquery(){
while true; do while true; do
read -p "Do you want to install GameServerQuery? [y/N]" yn read -p "Do you want to install GameServerQuery? [y/N]" yn
case $yn in case $yn in
[Yy]* ) wget -nv "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;; [Yy]* ) wget -nv -N "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;;
[Nn]* ) echo -e "Not installing GameServerQuery.";break;; [Nn]* ) echo -e "Not installing GameServerQuery.";break;;
* ) echo "Please answer yes or no.";; * ) echo "Please answer yes or no.";;
esac esac
@ -834,7 +910,7 @@ fn_steaminstall
fn_steamfix fn_steamfix
fn_loginstall fn_loginstall
fn_getquery fn_getquery
fn_gmoddeps fn_glibcfix
echo "Configuring ${gamename} Server" echo "Configuring ${gamename} Server"
echo "=================================" echo "================================="
sleep 1 sleep 1
@ -985,4 +1061,4 @@ case "$1" in
echo "Usage: $0 {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install}" echo "Usage: $0 {start|stop|restart|update|update-restart|validate|validate-restart|monitor|email-test|details|backup|console|debug|install}"
exit 1;; exit 1;;
esac esac
exit exit

131
Insurgency/insserver

@ -3,7 +3,7 @@
# Server Management Script # Server Management Script
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 170914 # Version: 200914
#### Variables #### #### Variables ####
@ -52,7 +52,6 @@ servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}" servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg" defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups" backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details # Server Details
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g') servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
@ -141,8 +140,8 @@ fi
fn_autoip(){ fn_autoip(){
# Identifies the server interface IP # Identifies the server interface IP
# If multiple interfaces this will need to be set manually # If multiple interfaces this will need to be set manually
getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1) getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1|wc -l) getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0|wc -l)
if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
if [ "${getipwc}" -ge "2" ]; then if [ "${getipwc}" -ge "2" ]; then
fn_printwarn "Multiple active network interfaces.\n\n" fn_printwarn "Multiple active network interfaces.\n\n"
@ -659,16 +658,112 @@ echo ""
## Installer ## Installer
# #
fn_insdeps(){ fn_glibcfix(){
echo "Downloading libc.so.6, libpthread.so.0 & librt.so.1" if [ -z $(command -v ldd) ]; then
echo "=================================" echo ""
sleep 1 echo -e "\r\033[K\e[0;31mFAIL\e[0;39m GLIBC is not detected."
cd "${filesdir}/bin" sleep 1
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libc.so.6 echo "Install GLIBC and retry installation"
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libpthread.so.0 sleep 1
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/librt.so.1 echo ""
sleep 1 while true; do
echo "" read -p "Continue install? [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; exit;;
* ) echo "Please answer yes or no.";;
esac
done
elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215 ]; then
echo "GLIBC Fix required"
echo "============================"
sleep 1
echo -e "\e[0;31mWARNING!\e[0;39m ${gamename} requires GLIBC_2.15 or above"
sleep 1
echo ""
echo "Currently installed: GLIBC_$(ldd --version |grep ldd|awk '{print $NF}')"
echo "Required: => GLIBC_2.15"
echo ""
sleep 1
echo "The installer will now detect and download the required files to allow ${gamename} server to run on a distro with GLIBC_2.14 or less."
echo "note: This will NOT upgrade GLIBC on your system"
sleep 1
echo ""
echo "Downloading Required files"
echo "================================="
sleep 1
if [ "${gamename}" == "Insurgency" ];then
echo "Detected Insurgency"
sleep 1
echo "Downloading files for Insurgency GLIBC Fix"
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/librt.so.1
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libpthread.so.0
sleep 1
elif [ "${gamename}" == "Garrys's Mod" ];then
echo "Detected Garrys's Mod"
sleep 1
echo "Downloading files for Garrys's Mod GLIBC Fix"
sleep 1
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libm.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libpthread.so.0
cp -v "${filesdir}/bin/libsteam.so" "${HOME}/.steam/sdk32/libsteam.so"
echo ""
elif [ "${gamename}" == "Natural Selection 2" ];then
echo "Detected Natural Selection 2"
sleep 1
echo "Downloading files for Natural Selection 2 GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "No More Room in Hell" ];then
echo "Detected No More Room in Hell"
sleep 1
echo "Downloading files for No More Room in Hell GLIBC Fix"
sleep 1
cd "${filesdir}/srcds"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NoMoreRoomInHell/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/srcds/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Blade Symphony" ];then
echo "Detected Blade Symphony"
sleep 1
echo "Downloading files for Blade Symphony GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Fistful of Frags" ];then
echo "Detected Fistful of Frags"
sleep 1
echo "Downloading files for Fistful of Frags GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/FistfulOfFrags/dependencies/libm.so.6
sleep 1
echo ""
elif [ "${gamename}" == "ARMA 3" ];then
echo "Detected ARMA 3"
sleep 1
echo "Downloading files for ARMA 3 GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
else
echo "error: Unable to detect game. Fix not applied"
fi
echo "GLIBC fix has been applied!"
sleep 1
echo ""
fi
} }
fn_header(){ fn_header(){
@ -690,7 +785,7 @@ mkdir -pv "steamcmd"
sleep 1 sleep 1
cd "steamcmd" cd "steamcmd"
if [ ! -f steamcmd.sh ]; then if [ ! -f steamcmd.sh ]; then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz wget -nv -N http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz rm -v steamcmd_linux.tar.gz
chmod +x steamcmd.sh chmod +x steamcmd.sh
@ -729,7 +824,7 @@ echo "================================="
sleep 1 sleep 1
mkdir -pv "${HOME}/.steam" mkdir -pv "${HOME}/.steam"
mkdir -pv "${HOME}/.steam/sdk32" mkdir -pv "${HOME}/.steam/sdk32"
cp -v "${steamclient}" "${HOME}/.steam/sdk32/steamclient.so" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so"
sleep 1 sleep 1
echo "" echo ""
} }
@ -758,7 +853,7 @@ fn_getquery(){
while true; do while true; do
read -p "Do you want to install GameServerQuery? [y/N]" yn read -p "Do you want to install GameServerQuery? [y/N]" yn
case $yn in case $yn in
[Yy]* ) wget -nv "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;; [Yy]* ) wget -nv -N "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;;
[Nn]* ) echo -e "Not installing GameServerQuery.";break;; [Nn]* ) echo -e "Not installing GameServerQuery.";break;;
* ) echo "Please answer yes or no.";; * ) echo "Please answer yes or no.";;
esac esac
@ -810,7 +905,7 @@ fn_steaminstall
fn_steamfix fn_steamfix
fn_loginstall fn_loginstall
fn_getquery fn_getquery
fn_insdeps fn_glibcfix
echo "Configuring ${gamename} Server" echo "Configuring ${gamename} Server"
echo "=================================" echo "================================="
sleep 1 sleep 1

134
NaturalSelection2/ns2server

@ -3,7 +3,7 @@
# Server Management Script # Server Management Script
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 170914 # Version: 200914
#### Variables #### #### Variables ####
@ -53,7 +53,6 @@ systemdir="${filesdir}"
executabledir="${filesdir}" executabledir="${filesdir}"
executable="./server_linux32" executable="./server_linux32"
backupdir="backups" backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Logging # Logging
logdays="7" logdays="7"
@ -138,8 +137,8 @@ fi
fn_autoip(){ fn_autoip(){
# Identifies the server interface IP # Identifies the server interface IP
# If multiple interfaces this will need to be set manually # If multiple interfaces this will need to be set manually
getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1) getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1|wc -l) getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0|wc -l)
if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
if [ "${getipwc}" -ge "2" ]; then if [ "${getipwc}" -ge "2" ]; then
fn_printwarn "Multiple active network interfaces.\n\n" fn_printwarn "Multiple active network interfaces.\n\n"
@ -657,19 +656,112 @@ echo ""
## Installer ## Installer
# #
fn_ns2deps(){ fn_glibcfix(){
echo "Downloading libm.so.6" if [ -z $(command -v ldd) ]; then
echo "=================================" echo ""
cd "${filesdir}" echo -e "\r\033[K\e[0;31mFAIL\e[0;39m GLIBC is not detected."
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6 sleep 1
sleep 1 echo "Install GLIBC and retry installation"
echo "" sleep 1
echo "Copying libstdc++.so.6" echo ""
echo "=================================" while true; do
cd "${filesdir}" read -p "Continue install? [y/N]" yn
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}" case $yn in
sleep 1 [Yy]* ) break;;
echo "" [Nn]* ) echo Exiting; exit;;
* ) echo "Please answer yes or no.";;
esac
done
elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215 ]; then
echo "GLIBC Fix required"
echo "============================"
sleep 1
echo -e "\e[0;31mWARNING!\e[0;39m ${gamename} requires GLIBC_2.15 or above"
sleep 1
echo ""
echo "Currently installed: GLIBC_$(ldd --version |grep ldd|awk '{print $NF}')"
echo "Required: => GLIBC_2.15"
echo ""
sleep 1
echo "The installer will now detect and download the required files to allow ${gamename} server to run on a distro with GLIBC_2.14 or less."
echo "note: This will NOT upgrade GLIBC on your system"
sleep 1
echo ""
echo "Downloading Required files"
echo "================================="
sleep 1
if [ "${gamename}" == "Insurgency" ];then
echo "Detected Insurgency"
sleep 1
echo "Downloading files for Insurgency GLIBC Fix"
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/librt.so.1
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libpthread.so.0
sleep 1
elif [ "${gamename}" == "Garrys's Mod" ];then
echo "Detected Garrys's Mod"
sleep 1
echo "Downloading files for Garrys's Mod GLIBC Fix"
sleep 1
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libm.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libpthread.so.0
cp -v "${filesdir}/bin/libsteam.so" "${HOME}/.steam/sdk32/libsteam.so"
echo ""
elif [ "${gamename}" == "Natural Selection 2" ];then
echo "Detected Natural Selection 2"
sleep 1
echo "Downloading files for Natural Selection 2 GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "No More Room in Hell" ];then
echo "Detected No More Room in Hell"
sleep 1
echo "Downloading files for No More Room in Hell GLIBC Fix"
sleep 1
cd "${filesdir}/srcds"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NoMoreRoomInHell/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/srcds/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Blade Symphony" ];then
echo "Detected Blade Symphony"
sleep 1
echo "Downloading files for Blade Symphony GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Fistful of Frags" ];then
echo "Detected Fistful of Frags"
sleep 1
echo "Downloading files for Fistful of Frags GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/FistfulOfFrags/dependencies/libm.so.6
sleep 1
echo ""
elif [ "${gamename}" == "ARMA 3" ];then
echo "Detected ARMA 3"
sleep 1
echo "Downloading files for ARMA 3 GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
else
echo "error: Unable to detect game. Fix not applied"
fi
echo "GLIBC fix has been applied!"
sleep 1
echo ""
fi
} }
fn_header(){ fn_header(){
@ -691,7 +783,7 @@ mkdir -pv "steamcmd"
sleep 1 sleep 1
cd "steamcmd" cd "steamcmd"
if [ ! -f steamcmd.sh ]; then if [ ! -f steamcmd.sh ]; then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz wget -nv -N http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz rm -v steamcmd_linux.tar.gz
chmod +x steamcmd.sh chmod +x steamcmd.sh
@ -730,7 +822,7 @@ echo "================================="
sleep 1 sleep 1
mkdir -pv "${HOME}/.steam" mkdir -pv "${HOME}/.steam"
mkdir -pv "${HOME}/.steam/sdk32" mkdir -pv "${HOME}/.steam/sdk32"
cp -v "${steamclient}" "${HOME}/.steam/sdk32/steamclient.so" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so"
sleep 1 sleep 1
echo "" echo ""
} }
@ -759,7 +851,7 @@ fn_getquery(){
while true; do while true; do
read -p "Do you want to install GameServerQuery? [y/N]" yn read -p "Do you want to install GameServerQuery? [y/N]" yn
case $yn in case $yn in
[Yy]* ) wget -nv "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;; [Yy]* ) wget -nv -N "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;;
[Nn]* ) echo -e "Not installing GameServerQuery.";break;; [Nn]* ) echo -e "Not installing GameServerQuery.";break;;
* ) echo "Please answer yes or no.";; * ) echo "Please answer yes or no.";;
esac esac
@ -811,7 +903,7 @@ fn_steaminstall
fn_steamfix fn_steamfix
fn_loginstall fn_loginstall
fn_getquery fn_getquery
fn_ns2deps fn_glibcfix
fn_header fn_header
sleep 1 sleep 1
fn_ns2details fn_ns2details

131
NoMoreRoomInHell/nmrihserver

@ -3,7 +3,7 @@
# Server Management Script # Server Management Script
# Author: Daniel Gibbs # Author: Daniel Gibbs
# Website: http://danielgibbs.co.uk # Website: http://danielgibbs.co.uk
# Version: 170914 # Version: 200914
#### Variables #### #### Variables ####
@ -52,7 +52,6 @@ servercfg="${servicename}.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}" servercfgfullpath="${servercfgdir}/${servercfg}"
defaultcfg="${servercfgdir}/server.cfg" defaultcfg="${servercfgdir}/server.cfg"
backupdir="backups" backupdir="backups"
steamclient="${rootdir}/steamcmd/linux32/steamclient.so"
# Server Details # Server Details
servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g') servername=$(grep -s hostname "${servercfgfullpath}"|sed 's/hostname //g'|sed 's/"//g')
@ -141,8 +140,8 @@ fi
fn_autoip(){ fn_autoip(){
# Identifies the server interface IP # Identifies the server interface IP
# If multiple interfaces this will need to be set manually # If multiple interfaces this will need to be set manually
getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1) getip=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0.1|wc -l) getipwc=$(ip -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0|wc -l)
if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
if [ "${getipwc}" -ge "2" ]; then if [ "${getipwc}" -ge "2" ]; then
fn_printwarn "Multiple active network interfaces.\n\n" fn_printwarn "Multiple active network interfaces.\n\n"
@ -605,7 +604,7 @@ fi
# Create lock file # Create lock file
date > ${lockselfname} date > ${lockselfname}
cd "${executabledir}" cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms} -debug -insecure" tmux new-session -d -s ${servicename} "${executable} ${parms} -insecure"
tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'" tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'"
sleep 1 sleep 1
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l) tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -E "^${servicename}:"|wc -l)
@ -659,14 +658,112 @@ echo ""
## Installer ## Installer
# #
fn_nmrihdeps(){ fn_glibcfix(){
echo "Downloading libm.so.6" if [ -z $(command -v ldd) ]; then
echo "=================================" echo ""
sleep 1 echo -e "\r\033[K\e[0;31mFAIL\e[0;39m GLIBC is not detected."
cd "${filesdir}/srcds" sleep 1
wget -nv https://github.com/dgibbs64/linuxgameservers/raw/master/NoMoreRoomInHell/dependencies/libm.so.6 echo "Install GLIBC and retry installation"
sleep 1 sleep 1
echo "" echo ""
while true; do
read -p "Continue install? [y/N]" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) echo Exiting; exit;;
* ) echo "Please answer yes or no.";;
esac
done
elif [ "$(ldd --version | sed -n '1 p' | tr -cd [:digit:] | tail -c 3)" -lt 215 ]; then
echo "GLIBC Fix required"
echo "============================"
sleep 1
echo -e "\e[0;31mWARNING!\e[0;39m ${gamename} requires GLIBC_2.15 or above"
sleep 1
echo ""
echo "Currently installed: GLIBC_$(ldd --version |grep ldd|awk '{print $NF}')"
echo "Required: => GLIBC_2.15"
echo ""
sleep 1
echo "The installer will now detect and download the required files to allow ${gamename} server to run on a distro with GLIBC_2.14 or less."
echo "note: This will NOT upgrade GLIBC on your system"
sleep 1
echo ""
echo "Downloading Required files"
echo "================================="
sleep 1
if [ "${gamename}" == "Insurgency" ];then
echo "Detected Insurgency"
sleep 1
echo "Downloading files for Insurgency GLIBC Fix"
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/librt.so.1
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/Insurgency/dependencies/libpthread.so.0
sleep 1
elif [ "${gamename}" == "Garrys's Mod" ];then
echo "Detected Garrys's Mod"
sleep 1
echo "Downloading files for Garrys's Mod GLIBC Fix"
sleep 1
cd "${filesdir}/bin"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libc.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libm.so.6
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/GarrysMod/dependencies/libpthread.so.0
cp -v "${filesdir}/bin/libsteam.so" "${HOME}/.steam/sdk32/libsteam.so"
echo ""
elif [ "${gamename}" == "Natural Selection 2" ];then
echo "Detected Natural Selection 2"
sleep 1
echo "Downloading files for Natural Selection 2 GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NaturalSelection2/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "No More Room in Hell" ];then
echo "Detected No More Room in Hell"
sleep 1
echo "Downloading files for No More Room in Hell GLIBC Fix"
sleep 1
cd "${filesdir}/srcds"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/NoMoreRoomInHell/dependencies/libm.so.6
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/srcds/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Blade Symphony" ];then
echo "Detected Blade Symphony"
sleep 1
echo "Downloading files for Blade Symphony GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
elif [ "${gamename}" == "Fistful of Frags" ];then
echo "Detected Fistful of Frags"
sleep 1
echo "Downloading files for Fistful of Frags GLIBC Fix"
sleep 1
cd "${filesdir}"
wget -nv -N https://github.com/dgibbs64/linuxgameservers/raw/master/FistfulOfFrags/dependencies/libm.so.6
sleep 1
echo ""
elif [ "${gamename}" == "ARMA 3" ];then
echo "Detected ARMA 3"
sleep 1
echo "Downloading files for ARMA 3 GLIBC Fix"
sleep 1
cp -v "${rootdir}/steamcmd/linux32/libstdc++.so.6" "${filesdir}/libstdc++.so.6"
sleep 1
echo ""
else
echo "error: Unable to detect game. Fix not applied"
fi
echo "GLIBC fix has been applied!"
sleep 1
echo ""
fi
} }
fn_header(){ fn_header(){
@ -688,7 +785,7 @@ mkdir -pv "steamcmd"
sleep 1 sleep 1
cd "steamcmd" cd "steamcmd"
if [ ! -f steamcmd.sh ]; then if [ ! -f steamcmd.sh ]; then
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz wget -nv -N http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar --verbose -zxf steamcmd_linux.tar.gz tar --verbose -zxf steamcmd_linux.tar.gz
rm -v steamcmd_linux.tar.gz rm -v steamcmd_linux.tar.gz
chmod +x steamcmd.sh chmod +x steamcmd.sh
@ -727,7 +824,7 @@ echo "================================="
sleep 1 sleep 1
mkdir -pv "${HOME}/.steam" mkdir -pv "${HOME}/.steam"
mkdir -pv "${HOME}/.steam/sdk32" mkdir -pv "${HOME}/.steam/sdk32"
cp -v "${steamclient}" "${HOME}/.steam/sdk32/steamclient.so" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so"
sleep 1 sleep 1
echo "" echo ""
} }
@ -756,7 +853,7 @@ fn_getquery(){
while true; do while true; do
read -p "Do you want to install GameServerQuery? [y/N]" yn read -p "Do you want to install GameServerQuery? [y/N]" yn
case $yn in case $yn in
[Yy]* ) wget -nv "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;; [Yy]* ) wget -nv -N "http://danielgibbs.co.uk/dl/gsquery.py"; chmod +x gsquery.py;break;;
[Nn]* ) echo -e "Not installing GameServerQuery.";break;; [Nn]* ) echo -e "Not installing GameServerQuery.";break;;
* ) echo "Please answer yes or no.";; * ) echo "Please answer yes or no.";;
esac esac
@ -808,7 +905,7 @@ fn_steaminstall
fn_steamfix fn_steamfix
fn_loginstall fn_loginstall
fn_getquery fn_getquery
fn_nmrihdeps fn_glibcfix
echo "Configuring ${gamename} Server" echo "Configuring ${gamename} Server"
echo "=================================" echo "================================="
sleep 1 sleep 1

Loading…
Cancel
Save