|
|
@ -2,25 +2,36 @@ |
|
|
|
# LGSM fn_check_steamcmd function |
|
|
|
# Author: Daniel Gibbs |
|
|
|
# Website: http://gameservermanagers.com |
|
|
|
lgsm_version="061115" |
|
|
|
lgsm_version="201215" |
|
|
|
|
|
|
|
# Description: Downloads SteamCMD on install and checks if missing before running functions that require SteamCMD |
|
|
|
# Description: Downloads SteamCMD on install. |
|
|
|
|
|
|
|
echo "" |
|
|
|
echo "Installing SteamCMD" |
|
|
|
echo "=================================" |
|
|
|
cd "${rootdir}" |
|
|
|
mkdir -pv "steamcmd" |
|
|
|
steamcmddir="${rootdir}/steamcmd" |
|
|
|
if [ ! -d "${steamcmddir}" ]; then |
|
|
|
mkdir -v "${steamcmddir}" |
|
|
|
fi |
|
|
|
sleep 1 |
|
|
|
cd "steamcmd" |
|
|
|
cd "${steamcmddir}" |
|
|
|
if [ ! -f steamcmd.sh ]; then |
|
|
|
echo -e "downloading steamcmd_linux.tar.gz...\c" |
|
|
|
wget -N /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 |
|
|
|
curl=$(curl --fail -o "${rootdir}/steamcmd/steamcmd_linux.tar.gz" "http://media.steampowered.com/client/steamcmd_linux.tar.gz" 2>&1) |
|
|
|
exitcode=$? |
|
|
|
echo -e "downloading steamcmd_linux.tar.gz...\c" |
|
|
|
if [ $exitcode -eq 0 ]; then |
|
|
|
fn_printokeol |
|
|
|
else |
|
|
|
fn_printfaileol |
|
|
|
echo "${curl}" |
|
|
|
echo -e "${githuburl}\n" |
|
|
|
exit $exitcode |
|
|
|
fi |
|
|
|
tar --verbose -zxf steamcmd_linux.tar.gz |
|
|
|
rm -v steamcmd_linux.tar.gz |
|
|
|
chmod +x steamcmd.sh |
|
|
|
sleep 1 |
|
|
|
else |
|
|
|
echo "Steam already installed!" |
|
|
|
echo "SteamCMD already installed!" |
|
|
|
fi |
|
|
|
sleep 1 |
|
|
|