Browse Source

Merge pull request #276 from Poil/master

Fix : binary operator expected and don't use a not not operator
pull/292/head
Daniel Gibbs 10 years ago
parent
commit
74e89b2cef
  1. 4
      7DaysToDie/sdtdserver
  2. 4
      Arma3/arma3server
  3. 4
      BladeSymphony/bsserver
  4. 4
      CounterStrike/csserver
  5. 4
      CounterStrikeGlobalOffensive/csgoserver
  6. 4
      CounterStrikeSource/cssserver
  7. 4
      DayOfDefeat/dodserver
  8. 4
      DayOfDefeatSource/dodsserver
  9. 4
      FistfulOfFrags/fofserver
  10. 4
      GarrysMod/gmodserver
  11. 4
      HalfLife2Deathmatch/hl2dmserver
  12. 4
      HalfLifeDeathmatchClassic/hldmcserver
  13. 4
      Insurgency/insserver
  14. 4
      JustCause2/jc2server
  15. 4
      KillingFloor/kfserver
  16. 4
      Left4Dead/l4dserver
  17. 4
      Left4Dead2/l4d2server
  18. 4
      Mumble/mumbleserver
  19. 4
      NaturalSelection2/ns2server
  20. 4
      NoMoreRoomInHell/nmrihserver
  21. 4
      RedOrchestra/roserver
  22. 4
      SeriousSam3BFE/ss3sserver
  23. 4
      TeamFortress2/tf2server
  24. 4
      TeamFortressClassic/tfcserver
  25. 2
      TheHiddenSource/thsserver
  26. 4
      UnrealTournament2004/ut2k4server
  27. 4
      UnrealTournament99/ut99server
  28. 13
      functions/fn_autoip
  29. 19
      functions/fn_check_ip
  30. 6
      functions/fn_check_logs
  31. 2
      functions/fn_compress_unreal2maps
  32. 2
      functions/fn_compress_ut99maps
  33. 12
      functions/fn_details_distro
  34. 12
      functions/fn_distrodetails
  35. 6
      functions/fn_install_logs
  36. 6
      functions/fn_loginstall
  37. 20
      functions/fn_messages
  38. 2
      functions/fn_unreal2compressmaps
  39. 2
      functions/fn_ut99compressmaps

4
7DaysToDie/sdtdserver

@ -40,8 +40,8 @@ engine="unity3d"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${filesdir}"

4
Arma3/arma3server

@ -36,8 +36,8 @@ engine="realvirtuality"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${filesdir}"

4
BladeSymphony/bsserver

@ -41,8 +41,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/berimbau"
executabledir="${filesdir}"

4
CounterStrike/csserver

@ -40,8 +40,8 @@ engine="goldsource"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/cstrike"
executabledir="${filesdir}"

4
CounterStrikeGlobalOffensive/csgoserver

@ -58,8 +58,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/csgo"
executabledir="${filesdir}"

4
CounterStrikeSource/cssserver

@ -41,8 +41,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/cstrike"
executabledir="${filesdir}"

4
DayOfDefeat/dodserver

@ -40,8 +40,8 @@ engine="goldsource"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/dod"
executabledir="${filesdir}"

4
DayOfDefeatSource/dodsserver

@ -41,8 +41,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/dod"
executabledir="${filesdir}"

4
FistfulOfFrags/fofserver

@ -41,8 +41,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/fof"
executabledir="${filesdir}"

4
GarrysMod/gmodserver

@ -46,8 +46,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/garrysmod"
executabledir="${filesdir}"

4
HalfLife2Deathmatch/hl2dmserver

@ -41,8 +41,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/hl2mp"
executabledir="${filesdir}"

4
HalfLifeDeathmatchClassic/hldmcserver

@ -40,8 +40,8 @@ engine="goldsource"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/valve"
executabledir="${filesdir}"

4
Insurgency/insserver

@ -41,8 +41,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/insurgency"
executabledir="${filesdir}"

4
JustCause2/jc2server

@ -37,8 +37,8 @@ engine="avalanche"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${filesdir}"

4
KillingFloor/kfserver

@ -40,8 +40,8 @@ appid="215360"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/System"
executabledir="${systemdir}"

4
Left4Dead/l4dserver

@ -41,8 +41,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/left4dead"
executabledir="${filesdir}"

4
Left4Dead2/l4d2server

@ -40,8 +40,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/left4dead2"
executabledir="${filesdir}"

4
Mumble/mumbleserver

@ -18,8 +18,8 @@ servicename="mumble-server"
# Directorys
rootdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
ini="murmur.ini"
executable="./murmur.x86 -fg -ini ${ini}"

4
NaturalSelection2/ns2server

@ -50,8 +50,8 @@ engine="spark"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${filesdir}"

4
NoMoreRoomInHell/nmrihserver

@ -41,8 +41,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/nmrih"
executabledir="${filesdir}"

4
RedOrchestra/roserver

@ -36,8 +36,8 @@ appid="223250"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/system"
executabledir="${systemdir}"

4
SeriousSam3BFE/ss3sserver

@ -36,8 +36,8 @@ engine="seriousengine35"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/Bin"
executabledir="${systemdir}"

4
TeamFortress2/tf2server

@ -41,8 +41,8 @@ engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/tf"
executabledir="${filesdir}"

4
TeamFortressClassic/tfcserver

@ -40,8 +40,8 @@ engine="goldsource"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/tfc"
executabledir="${filesdir}"

2
TheHiddenSource/thsserver

@ -30,7 +30,7 @@ engine="source"
# Directorys
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
selfname="$0"
selfname="$(basename $0)"
filesdir="${rootdir}/serverfiles"
servercfg="${filesdir}/hidden/cfg/${servicename}.cfg"
backupdir="backups"

4
UnrealTournament2004/ut2k4server

@ -27,8 +27,8 @@ engine="unreal2"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename 0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/System"
executabledir="${systemdir}"

4
UnrealTournament99/ut99server

@ -29,8 +29,8 @@ engine="unreal"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$0"
lockselfname=$(echo ".${servicename}.lock")
selfname="$(basename 0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/System"
executabledir="${systemdir}"

13
functions/fn_autoip

@ -12,17 +12,8 @@ if [ ! -f /bin/ip ]; then
else
ipcommand="ip"
fi
getip=$(${ipcommand} -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
getipwc=$(${ipcommand} -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -vc 127.0.0)
getip=$(hostname -I)
if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
if [ "${getipwc}" -ge "2" ]; then
fn_printwarn "Multiple active network interfaces found.\n\n"
echo -en "Manually specify the IP you want to use within the ${selfname} script.\n"
echo -en "Set ip=\"0.0.0.0\" to one of the following:\n"
echo -en "${getip}\n"
exit
else
ip=${getip}
fi
ip=${getip}
fi

19
functions/fn_check_ip

@ -7,22 +7,9 @@
# Description: Automatically identifies the server interface IP.
# If multiple interfaces are detected the user will need to manualy set using ip="0.0.0.0".
if [ ! -f /bin/ip ]; then
ipcommand="/sbin/ip"
else
ipcommand="ip"
fi
getip=$(${ipcommand} -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -v 127.0.0)
getipwc=$(${ipcommand} -o -4 addr|awk '{print $4 }'|grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}'|grep -vc 127.0.0)
getip=$(hostname -I)
if [ "${ip}" == "0.0.0.0" ]||[ "${ip}" == "" ]; then
if [ "${getipwc}" -ge "2" ]; then
fn_printwarn "Multiple active network interfaces found.\n\n"
echo -en "Manually specify the IP you want to use within the ${selfname} script.\n"
echo -en "Set ip=\"0.0.0.0\" to one of the following:\n"
echo -en "${getip}\n"
exit
else
ip=${getip}
fi
ip=${getip}
fi

6
functions/fn_check_logs

@ -17,7 +17,7 @@ touch "${consolelog}"
# If a server is source or goldsource create a symbolic link to the game server logs
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
if [ ! -h "${rootdir}/log/server" ]; then
ln -sv "${gamelogdir}" "${rootdir}/log/server"
ln -nfsv "${gamelogdir}" "${rootdir}/log/server"
else
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
fi
@ -28,13 +28,13 @@ if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]; then
fi
if [ "${gamename}" == "7 Days To Die" ]; then
if [ ! -h "${gamelogdir}/output_log.txt" ]; then
ln -sv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
ln -nfsv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
fi
fi
# If server uses SteamCMD create a symbolic link to the Steam logs
if [ -d "${rootdir}/Steam/logs" ]; then
if [ ! -h "${rootdir}/log/steamcmd" ]; then
ln -sv "${rootdir}/Steam/logs" "${rootdir}/log/steamcmd"
ln -nfsv "${rootdir}/Steam/logs" "${rootdir}/log/steamcmd"
else
echo "Symbolic link ${rootdir}/Steam/logs => ${rootdir}/log/steamcmd already exists!"
fi

2
functions/fn_compress_unreal2maps

@ -27,7 +27,7 @@ done
mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1
rm -rfv "${filesdir}/Maps/*.uz2"
cd "${systemdir}"
for map in `ls "${filesdir}/Maps"`; do
for map in "${filesdir}/Maps/*"; do
./ucc-bin compress "../Maps/${map}" --nohomedir
done
mv -fv "${filesdir}/Maps/*.uz2" "${compressedmapsdir}"

2
functions/fn_compress_ut99maps

@ -27,7 +27,7 @@ done
mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1
rm -rfv "${filesdir}/Maps/*.unr.uz"
cd "${systemdir}"
for map in `ls "${filesdir}/Maps"`; do
for map in "${filesdir}/Maps/*"; do
./ucc-bin compress ../Maps/${map} --nohomedir
done
mv -fv "${filesdir}/Maps/*.unr.uz" "${compressedmapsdir}"

12
functions/fn_details_distro

@ -48,12 +48,12 @@ if [ "$(free -h > /dev/null 2>&1; echo $?)" -ne "0" ]; then
else
option="-h"
fi
physmemtotal=$(free ${option} | grep "Mem:" | awk '{print $2}')
physmemused=$(free ${option} | grep "Mem:" | awk '{print $3}')
physmemfree=$(free ${option} | grep "Mem:" | awk '{print $4}')
swaptotal=$(free ${option} | grep "Swap:" | awk '{print $2}')
swapused=$(free ${option} | grep "Swap:" | awk '{print $3}')
swapfree=$(free ${option} | grep "Swap:" | awk '{print $4}')
physmemtotal=$(free ${option} | awk '/Mem:/ {print $2}')
physmemused=$(free ${option} | awk '/Mem:/ {print $3}')
physmemfree=$(free ${option} | awk '/Mem:/ {print $4}')
swaptotal=$(free ${option} | | awk '/Swap:/ {print $2}')
swapused=$(free ${option} | awk '/Swap:/ {print $3}')
swapfree=$(free ${option} | awk '/Swap:/ {print $4}')
# Uptime
uptime=$(</proc/uptime)

12
functions/fn_distrodetails

@ -48,12 +48,12 @@ if [ "$(free -h > /dev/null 2>&1; echo $?)" -ne "0" ]; then
else
option="-h"
fi
physmemtotal=$(free ${option} | grep "Mem:" | awk '{print $2}')
physmemused=$(free ${option} | grep "Mem:" | awk '{print $3}')
physmemfree=$(free ${option} | grep "Mem:" | awk '{print $4}')
swaptotal=$(free ${option} | grep "Swap:" | awk '{print $2}')
swapused=$(free ${option} | grep "Swap:" | awk '{print $3}')
swapfree=$(free ${option} | grep "Swap:" | awk '{print $4}')
physmemtotal=$(free ${option} | awk '/Mem:/ {print $2}')
physmemused=$(free ${option} | awk '/Mem:/ {print $3}')
physmemfree=$(free ${option} | awk '/Mem:/ {print $4}')
swaptotal=$(free ${option} | | awk '/Swap:/ {print $2}')
swapused=$(free ${option} | awk '/Swap:/ {print $3}')
swapfree=$(free ${option} | awk '/Swap:/ {print $4}')
# Uptime
uptime=$(</proc/uptime)

6
functions/fn_install_logs

@ -17,7 +17,7 @@ touch "${consolelog}"
# If a server is source or goldsource create a symbolic link to the game server logs
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
if [ ! -h "${rootdir}/log/server" ]; then
ln -sv "${gamelogdir}" "${rootdir}/log/server"
ln -nfsv "${gamelogdir}" "${rootdir}/log/server"
else
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
fi
@ -28,13 +28,13 @@ if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]; then
fi
if [ "${gamename}" == "7 Days To Die" ]; then
if [ ! -h "${gamelogdir}/output_log.txt" ]; then
ln -sv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
ln -nfsv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
fi
fi
# If server uses SteamCMD create a symbolic link to the Steam logs
if [ -d "${rootdir}/Steam/logs" ]; then
if [ ! -h "${rootdir}/log/steamcmd" ]; then
ln -sv "${rootdir}/Steam/logs" "${rootdir}/log/steamcmd"
ln -nfsv "${rootdir}/Steam/logs" "${rootdir}/log/steamcmd"
else
echo "Symbolic link ${rootdir}/Steam/logs => ${rootdir}/log/steamcmd already exists!"
fi

6
functions/fn_loginstall

@ -17,7 +17,7 @@ touch "${consolelog}"
# If a server is source or goldsource create a symbolic link to the game server logs
if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
if [ ! -h "${rootdir}/log/server" ]; then
ln -sv "${gamelogdir}" "${rootdir}/log/server"
ln -nfsv "${gamelogdir}" "${rootdir}/log/server"
else
echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
fi
@ -28,13 +28,13 @@ if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]; then
fi
if [ "${gamename}" == "7 Days To Die" ]; then
if [ ! -h "${gamelogdir}/output_log.txt" ]; then
ln -sv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
ln -nfsv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
fi
fi
# If server uses SteamCMD create a symbolic link to the Steam logs
if [ -d "${rootdir}/Steam/logs" ]; then
if [ ! -h "${rootdir}/log/steamcmd" ]; then
ln -sv "${rootdir}/Steam/logs" "${rootdir}/log/steamcmd"
ln -nfsv "${rootdir}/Steam/logs" "${rootdir}/log/steamcmd"
else
echo "Symbolic link ${rootdir}/Steam/logs => ${rootdir}/log/steamcmd already exists!"
fi

20
functions/fn_messages

@ -8,7 +8,7 @@
# Date and servicename for log files.
fn_scriptlog(){
if [ ! -z ${modulename} ]; then
if [[ -n ${modulename} ]]; then
echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${modulename}: ${1}" >> "${scriptlog}"
else
echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${1}" >> "${scriptlog}"
@ -17,7 +17,7 @@ fn_scriptlog(){
# [ FAIL ]
fn_printfail(){
if [ ! -z ${modulename} ]; then
if [[ -n ${modulename} ]]; then
echo -en "\r\033[K[\e[0;31m FAIL \e[0m] ${modulename} ${servicename}: $@"
else
echo -en "\r\033[K[\e[0;31m FAIL \e[0m] $@"
@ -25,7 +25,7 @@ fn_printfail(){
}
fn_printfailnl(){
if [ ! -z ${modulename} ]; then
if [[ -n ${modulename} ]]; then
echo -e "\r\033[K[\e[0;31m FAIL \e[0m] ${modulename} ${servicename}: $@"
else
echo -e "\r\033[K[\e[0;31m FAIL \e[0m] $@"
@ -34,7 +34,7 @@ fn_printfailnl(){
# [ OK ]
fn_printok(){
if [ ! -z ${modulename} ]; then
if [[ -n ${modulename} ]]; then
echo -en "\r\033[K[\e[0;32m OK \e[0m] ${modulename} ${servicename}: $@"
else
echo -en "\r\033[K[\e[0;32m OK \e[0m] $@"
@ -42,7 +42,7 @@ fn_printok(){
}
fn_printoknl(){
if [ ! -z ${modulename} ]; then
if [[ -n ${modulename} ]]; then
echo -e "\r\033[K[\e[0;32m OK \e[0m] ${modulename} ${servicename}: $@"
else
echo -e "\r\033[K[\e[0;32m OK \e[0m] $@"
@ -51,7 +51,7 @@ fn_printoknl(){
# [ INFO ]
fn_printinfo(){
if [ ! -z ${modulename} ]; then
if [[ -n ${modulename} ]]; then
echo -en "\r\033[K[\e[0;36m INFO \e[0m] ${modulename} ${servicename}: $@"
else
echo -en "\r\033[K[\e[0;36m INFO \e[0m] $@"
@ -59,7 +59,7 @@ fn_printinfo(){
}
fn_printinfonl(){
if [ ! -z ${modulename} ]; then
if [[ -n ${modulename} ]]; then
echo -e "\r\033[K[\e[0;36m INFO \e[0m] ${modulename} ${servicename}: $@"
else
echo -e "\r\033[K[\e[0;36m INFO \e[0m] $@"
@ -68,7 +68,7 @@ fn_printinfonl(){
# [ WARN ]
fn_printwarn(){
if [ ! -z ${modulename} ]; then
if [[ -n ${modulename} ]]; then
echo -en "\r\033[K[\e[1;33m WARN \e[0m] ${modulename} ${servicename}: $@"
else
echo -en "\r\033[K[\e[1;33m WARN \e[0m] $@"
@ -76,7 +76,7 @@ fn_printwarn(){
}
fn_printwarnnl(){
if [ ! -z ${modulename} ]; then
if [[ -n ${modulename} ]]; then
echo -e "\r\033[K[\e[1;33m WARN \e[0m] ${modulename} ${servicename}: $@"
else
echo -e "\r\033[K[\e[1;33m WARN \e[0m] $@"
@ -85,7 +85,7 @@ fn_printwarnnl(){
# [ .... ]
fn_printdots(){
if [ ! -z ${modulename} ]; then
if [[ -n ${modulename} ]]; then
echo -en "\r\033[K[ .... ] ${modulename} ${servicename}: $@"
else
echo -en "\r\033[K[ .... ] $@"

2
functions/fn_unreal2compressmaps

@ -27,7 +27,7 @@ done
mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1
rm -rfv "${filesdir}/Maps/*.uz2"
cd "${systemdir}"
for map in `ls "${filesdir}/Maps"`; do
for map in "${filesdir}/Maps/*"; do
./ucc-bin compress "../Maps/${map}" --nohomedir
done
mv -fv "${filesdir}/Maps/*.uz2" "${compressedmapsdir}"

2
functions/fn_ut99compressmaps

@ -27,7 +27,7 @@ done
mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1
rm -rfv "${filesdir}/Maps/*.unr.uz"
cd "${systemdir}"
for map in `ls "${filesdir}/Maps"`; do
for map in "${filesdir}/Maps/*"; do
./ucc-bin compress ../Maps/${map} --nohomedir
done
mv -fv "${filesdir}/Maps/*.unr.uz" "${compressedmapsdir}"
Loading…
Cancel
Save