Notify user when steamcmd login is required

This commit is contained in:
Ben Peddell 2017-06-24 21:02:04 +10:00
parent 586a688a0c
commit 8a3b88ac0b

View File

@ -1325,6 +1325,9 @@ doInstall() {
# install the server # install the server
doDownloadSteamCMD doDownloadSteamCMD
runSteamCMDAppUpdate "$arkserverroot" validate runSteamCMDAppUpdate "$arkserverroot" validate
if [ $? -eq 5 ]; then
echo "User ${steamlogin:-anonymous} login failed - please login to steamcmd manually"
fi
# the current version should be the last version. We set our version # the current version should be the last version. We set our version
instver="$(getCurrentVersion)" instver="$(getCurrentVersion)"
} }
@ -1737,8 +1740,11 @@ doUpdate() {
logprint "Downloading ARK update" >/dev/null logprint "Downloading ARK update" >/dev/null
doDownloadSteamCMD doDownloadSteamCMD
cd "$steamcmdroot" cd "$steamcmdroot"
if runSteamCMDAppUpdate "$arkStagingDir" $validate; then runSteamCMDAppUpdate "$arkStagingDir" $validate
if [ $? -eq 0 ]; then
rm -rf "${arkStagingDir}/steamapps/downloading/${appid}" rm -rf "${arkStagingDir}/steamapps/downloading/${appid}"
elif [ $? -eq 5 ]; then
echo "User ${steamlogin:-anonymous} login failed - please login to steamcmd manually"
fi fi
if [ -d "${arkStagingDir}/steamapps/downloading/${appid}" ]; then if [ -d "${arkStagingDir}/steamapps/downloading/${appid}" ]; then
@ -1877,6 +1883,9 @@ doUpdate() {
doDownloadSteamCMD doDownloadSteamCMD
cd "$steamcmdroot" cd "$steamcmdroot"
runSteamCMDAppUpdate "$arkserverroot" $validate runSteamCMDAppUpdate "$arkserverroot" $validate
if [ $? -eq 5 ]; then
echo "User ${steamlogin:-anonymous} login failed - please login to steamcmd manually"
fi
fi fi
# the current version should be the last version. We set our version # the current version should be the last version. We set our version
instver="$(getCurrentVersion)" instver="$(getCurrentVersion)"
@ -2005,6 +2014,9 @@ doDownloadMod(){
if [ $result -eq 0 ]; then if [ $result -eq 0 ]; then
modsrcdir="$(echo "$output" | sed -n 's@^Success. Downloaded item [0-9][0-9]* to "\([^"]*\)" .*@\1@p')" modsrcdir="$(echo "$output" | sed -n 's@^Success. Downloaded item [0-9][0-9]* to "\([^"]*\)" .*@\1@p')"
break break
elif [ $result -eq 5 ]; then
echo "User ${steamlogin:-anonymous} login failed - please login to steamcmd manually"
return 1
else else
echo echo
failedmod="$(tail -n 20 "${steamcmd_workshoplog}" | sed -n 's|.* Download item \([0-9]*\) result : \(.*\)|\1\t\2|p' | grep -v $'\tOK' | tail -n1 | cut -f1)" failedmod="$(tail -n 20 "${steamcmd_workshoplog}" | sed -n 's|.* Download item \([0-9]*\) result : \(.*\)|\1\t\2|p' | grep -v $'\tOK' | tail -n1 | cut -f1)"
@ -3122,9 +3134,9 @@ main(){
checkupdate) checkupdate)
checkForUpdate checkForUpdate
;; ;;
checkmodupdate) checkmodupdate)
checkForModUpdate checkForModUpdate
;; ;;
installmod) installmod)
doInstallMod "${args[@]}" doInstallMod "${args[@]}"
;; ;;