소스 검색

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