Browse Source

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 năm trước cách đây
mục cha
commit
01be80d4b3
1 tập tin đã thay đổi với 17 bổ sung15 xóa
  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