Explorar o código

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 %!s(int64=10) %!d(string=hai) anos
pai
achega
01be80d4b3
Modificáronse 1 ficheiros con 17 adicións e 15 borrados
  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