Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
bad8b25b36
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      functions/fn_install_serverfiles

+ 7 - 1
functions/fn_install_serverfiles

@@ -5,6 +5,12 @@
 # Version: 050515
 # Version: 050515
 
 
 fn_steaminstallcommand(){
 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"
 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
 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))
 	counter=$((counter+1))
@@ -75,4 +81,4 @@ if [ -z "${autoinstall}" ]; then
 			* ) echo "Please answer yes or no.";;
 			* ) echo "Please answer yes or no.";;
 		esac
 		esac
 	done
 	done
-fi
+fi