gameservergame-servergame-servershacktoberfestdedicated-game-serversgamelinuxgsmserverbashgaminglinuxmultiplayer-game-servershell
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
#!/bin/bash
|
|
# LGSM fn_check_steamcmd function
|
|
# Author: Daniel Gibbs
|
|
# Website: http://danielgibbs.co.uk
|
|
# Version: 210115
|
|
|
|
# Description: Downloads SteamCMD on install and checks if missing before running functions that require SteamCMD
|
|
|
|
|
|
if [ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "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_details_config
|
|
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}"
|
|
fi
|
|
|