|
@@ -12,22 +12,27 @@ if [ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tourn
|
|
|
elif [ "${modulename}" == "Starting" ]||[ "${modulename}" == "Update" ]; then
|
|
elif [ "${modulename}" == "Starting" ]||[ "${modulename}" == "Update" ]; then
|
|
|
# Checks if SteamCMD exists when starting or updating a server.
|
|
# Checks if SteamCMD exists when starting or updating a server.
|
|
|
# Re-installs if missing.
|
|
# Re-installs if missing.
|
|
|
- if [ ! -f ${rootdir}/steamcmd/steamcmd.sh ]; then
|
|
|
|
|
- fn_details_config
|
|
|
|
|
- fn_printwarn "SteamCMD is missing"
|
|
|
|
|
|
|
+ steamcmddir="${rootdir}/steamcmd"
|
|
|
|
|
+ if [ ! -f "${steamcmddir}/steamcmd.sh" ]; then
|
|
|
|
|
+ fn_printwarnnl "SteamCMD is missing"
|
|
|
fn_scriptlog "SteamCMD is missing"
|
|
fn_scriptlog "SteamCMD is missing"
|
|
|
sleep 1
|
|
sleep 1
|
|
|
- echo -en "\n"
|
|
|
|
|
- mkdir -pv "${rootdir}/steamcmd"
|
|
|
|
|
- cd "${rootdir}/steamcmd"
|
|
|
|
|
|
|
+ if [ ! -d "${steamcmddir}" ]; then
|
|
|
|
|
+ mkdir -v "${steamcmddir}"
|
|
|
|
|
+ fi
|
|
|
|
|
+ curl=$(curl --fail -o "${steamcmddir}/steamcmd_linux.tar.gz" "http://media.steampowered.com/client/steamcmd_linux.tar.gz" 2>&1)
|
|
|
|
|
+ exitcode=$?
|
|
|
echo -e "downloading steamcmd_linux.tar.gz...\c"
|
|
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
|
|
|
|
|
- fn_scriptlog "Re-installed SteamCMD"
|
|
|
|
|
- fn_printdots "${servername}"
|
|
|
|
|
- sleep 1
|
|
|
|
|
|
|
+ if [ $exitcode -eq 0 ]; then
|
|
|
|
|
+ fn_printokeol
|
|
|
|
|
+ else
|
|
|
|
|
+ fn_printfaileol
|
|
|
|
|
+ echo "${curl}"
|
|
|
|
|
+ echo -e "${githuburl}\n"
|
|
|
|
|
+ exit $exitcode
|
|
|
|
|
+ fi
|
|
|
|
|
+ tar --verbose -zxf "${steamcmddir}/steamcmd_linux.tar.gz" -C "${steamcmddir}"
|
|
|
|
|
+ rm -v "${steamcmddir}/steamcmd_linux.tar.gz"
|
|
|
|
|
+ chmod +x "${steamcmddir}/steamcmd.sh"
|
|
|
fi
|
|
fi
|
|
|
- cd "${rootdir}"
|
|
|
|
|
fi
|
|
fi
|