瀏覽代碼

Tell people Steam username variable isn't set

The script will also resort to trying to use the default anonymous login for any hopes of getting the server installed
Scarsz 11 年之前
父節點
當前提交
bad8b25b36
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      functions/fn_install_serverfiles

+ 7 - 1
functions/fn_install_serverfiles

@@ -5,6 +5,12 @@
 # Version: 050515
 
 fn_steaminstallcommand(){
+if [ -z "${steamuser}" ]; then
+	fn_printwarningnl "SteamCMD user variable is not assigned in the main script! Resorting to anonymous login"
+	steamuser="anonymous"
+	steampass=""
+fi
+
 counter="0"
 while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x406 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x6 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x106 .fn_install_serverfiles.tmp)" -ge "1" ]; do
 	counter=$((counter+1))
@@ -75,4 +81,4 @@ if [ -z "${autoinstall}" ]; then
 			* ) echo "Please answer yes or no.";;
 		esac
 	done
-fi
+fi