|
|
@@ -2,23 +2,50 @@
|
|
|
# LGSM fn_steamdl function
|
|
|
# Author: Daniel Gibbs
|
|
|
# Website: http://danielgibbs.co.uk
|
|
|
-# Version: 241214
|
|
|
+# Version: 090115
|
|
|
|
|
|
-echo ""
|
|
|
-echo "Installing SteamCMD"
|
|
|
-echo "================================="
|
|
|
-cd "${rootdir}"
|
|
|
-mkdir -pv "steamcmd"
|
|
|
-sleep 1
|
|
|
-cd "steamcmd"
|
|
|
-if [ ! -f steamcmd.sh ]; then
|
|
|
- echo -e "downloading steamcmd_linux.tar.gz...\c"
|
|
|
- wget -N --no-check-certificate /dev/null http://media.steampowered.com/client/steamcmd_linux.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
|
|
|
- tar --verbose -zxf steamcmd_linux.tar.gz
|
|
|
- rm -v steamcmd_linux.tar.gz
|
|
|
- chmod +x steamcmd.sh
|
|
|
- sleep 1
|
|
|
+# Description: Downloads SteamCMD on install and checks if missing before running functions that require SteamCMD
|
|
|
+
|
|
|
+
|
|
|
+if [ "${gamename}" == "Unreal Tournament 99" ]||[ "${modulename}" == "Unreal Tournament 2004" ]; then
|
|
|
+ : # These servers do not require SteamCMD. Check is skipped.
|
|
|
+elif [ "${modulename}" == "Starting" ]||[ "${modulename}" == "Update" ]; then
|
|
|
+ # Checks if SteamCMD exists when starting or updating a server.
|
|
|
+ # Re-installs if missing.
|
|
|
+ if [ ! -f ${rootdir}/steamcmd/steamcmd.sh ]; then
|
|
|
+ fn_printwarn "SteamCMD is missing"
|
|
|
+ fn_scriptlog "SteamCMD is missing"
|
|
|
+ sleep 1
|
|
|
+ echo -en "\n"
|
|
|
+ mkdir -pv "${rootdir}/steamcmd"
|
|
|
+ cd "${rootdir}/steamcmd"
|
|
|
+ echo -e "downloading steamcmd_linux.tar.gz...\c"
|
|
|
+ wget -N --no-check-certificate /dev/null http://media.steampowered.com/client/steamcmd_linux.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
|
|
|
+ tar --verbose -zxf steamcmd_linux.tar.gz
|
|
|
+ rm -v steamcmd_linux.tar.gz
|
|
|
+ chmod +x steamcmd.sh
|
|
|
+ fn_scriptlog "Re-installed SteamCMD"
|
|
|
+ fn_printdots "${servername}"
|
|
|
+ sleep 1
|
|
|
+ fi
|
|
|
+ cd "${rootdir}"
|
|
|
else
|
|
|
- echo "Steam already installed!"
|
|
|
+ echo ""
|
|
|
+ echo "Installing SteamCMD"
|
|
|
+ echo "================================="
|
|
|
+ cd "${rootdir}"
|
|
|
+ mkdir -pv "steamcmd"
|
|
|
+ sleep 1
|
|
|
+ cd "steamcmd"
|
|
|
+ if [ ! -f steamcmd.sh ]; then
|
|
|
+ echo -e "downloading steamcmd_linux.tar.gz...\c"
|
|
|
+ wget -N --no-check-certificate /dev/null http://media.steampowered.com/client/steamcmd_linux.tar.gz 2>&1 | grep -F HTTP | cut -c45-| uniq
|
|
|
+ tar --verbose -zxf steamcmd_linux.tar.gz
|
|
|
+ rm -v steamcmd_linux.tar.gz
|
|
|
+ chmod +x steamcmd.sh
|
|
|
+ sleep 1
|
|
|
+ else
|
|
|
+ echo "Steam already installed!"
|
|
|
+ fi
|
|
|
+ sleep 1
|
|
|
fi
|
|
|
-sleep 1
|