Ver Fonte

fix(av): fix will trigger on start as well (#4123)

this should resolve the steamclient bug
Daniel Gibbs há 3 anos atrás
pai
commit
c957b2aa5a
2 ficheiros alterados com 6 adições e 4 exclusões
  1. 2 0
      lgsm/functions/fix.sh
  2. 4 4
      lgsm/functions/fix_av.sh

+ 2 - 0
lgsm/functions/fix.sh

@@ -43,6 +43,8 @@ if [ "${commandname}" != "INSTALL" ] && [ -z "${fixbypass}" ]; then
 		fix_armar.sh
 	elif [ "${shortname}" == "ark" ]; then
 		fix_ark.sh
+	elif [ "${shortname}" == "av" ]; then
+		fix_av.sh
 	elif [ "${shortname}" == "bt" ]; then
 		fix_bt.sh
 	elif [ "${shortname}" == "bo" ]; then

+ 4 - 4
lgsm/functions/fix_av.sh

@@ -9,11 +9,11 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64"
 
-if [ "${postinstall}" == "1" ]; then
+# Generates the server config if it doesn't exist.
+if [ ! -f "${servercfgfullpath}" ]; then
 	startparameters="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only"
 	fn_print_information "starting ${gamename} server to generate configs."
 	fn_sleep_time
-	# go to the executeable dir and start the init of the server
-	cd "${systemdir}" || return 2
-	"${executabledir}/${executable}" ${startparameters}
+	cd "${systemdir}" || exit
+	eval "${executable} ${startparameters}"
 fi