Sfoglia il codice sorgente

Update update_mc.sh (#4563)

If the executable variable is modified, fn_update_dl does not update minecraft_server.jar and which is used in fn_update_localbuild.

In addition this creates a problem if a alternative executable is used to launch minecraft by overwriting it.

Co-authored-by: Daniel Gibbs <me@danielgibbs.co.uk>
BertBrenner 2 anni fa
parent
commit
1c596972ff
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      lgsm/modules/update_mc.sh

+ 1 - 1
lgsm/modules/update_mc.sh

@@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 fn_update_dl() {
 	# Download and extract files to serverfiles.
 	fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "chmodx" "norun" "noforce" "nohash"
-	cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/${executable#./}"
+	cp -f "${tmpdir}/${remotebuildfilename}" "${serverfiles}/minecraft_server.jar"
 	fn_clear_tmp
 }