Răsfoiți Sursa

Updated fn_check_steamuser to exit if user not set

Instead of continuing with an install or update that will fail script
will now exir
Daniel Gibbs 10 ani în urmă
părinte
comite
01be80d4b3
1 a modificat fișierele cu 17 adăugiri și 15 ștergeri
  1. 17 15
      functions/fn_check_steamuser

+ 17 - 15
functions/fn_check_steamuser

@@ -2,20 +2,22 @@
 # LGSM fn_check_steamuser function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-# Version: 011115
+# Version: 040715
 
-if [ -z "${steamuser}" ]||[ "${steamuser}" == "username" ]; then
-		fn_printwarnnl "Steam login not set. Using anonymous login."
-		if [ -d "${scriptlogdir}" ]; then
-			fn_scriptlog "Steam login not set. Using anonymous login."
-		fi
-		if [ "${steamuser}" == "username" ]; then
-			echo "	* Change steamuser=\"username\" to a valid steam login."
-			if [ -d "${scriptlogdir}" ]; then
-				fn_scriptlog "Change steamuser=\"username\" to a valid steam login."
-			fi
-		fi
-		steamuser="anonymous"
-		steampass=""
-		sleep 2
+if [ "${steamuser}" == "username" ]; then
+	fn_printfailnl "Steam login not set. Update steamuser."	
+	echo "	* Change steamuser=\"username\" to a valid steam login."
+	if [ -d ${scriptlogdir} ]; then
+		fn_scriptlog "edit ${selfname}. change steamuser=\"username\" to a valid steam login."
+		exit 1
+	fi
+fi
+if [ -z "${steamuser}" ]; then
+	fn_printwarnnl "Steam login not set. Using anonymous login."
+	if [ -d ${scriptlogdir} ]; then
+		fn_scriptlog "Steam login not set. Using anonymous login."
+	fi
+	steamuser="anonymous"
+	steampass=""
+	sleep 2
 fi