Daniel Gibbs 2 лет назад
Родитель
Сommit
0ba79673ba

+ 1 - 1
lgsm/config-default/config-lgsm/hwserver/_default.cfg

@@ -26,7 +26,7 @@ admins=""
 loadsave=""
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
-# Edit with care | http://hurtworld.wikia.com/wiki/Hosting_A_Server
+# http://hurtworld.wikia.com/wiki/Hosting_A_Server
 startparameters="-batchmode -nographics -logfile ${gamelog} -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\""
 
 #### LinuxGSM Settings ####

+ 0 - 1
lgsm/config-default/config-lgsm/mtaserver/_default.cfg

@@ -12,7 +12,6 @@
 ip="0.0.0.0"
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
-# Edit with care
 startparameters=""
 
 #### LinuxGSM Settings ####

+ 1 - 1
lgsm/config-default/config-lgsm/stnserver/_default.cfg

@@ -12,7 +12,7 @@ maxplayers="20"
 region="0"
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
-# Edit with care | https://colonysurvival.gamepedia.com/Dedicated_Server#Installation_.28Linux.29
+# https://colonysurvival.gamepedia.com/Dedicated_Server#Installation_.28Linux.29
 startparameters="-mc ${maxplayers} -r ${region}"
 
 #### LinuxGSM Settings ####

+ 0 - 1
lgsm/config-default/config-lgsm/stserver/_default.cfg

@@ -13,7 +13,6 @@ worldname="moon_save"
 worldtype="Moon"
 
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
-# Edit with care
 startparameters="-LOADLATEST ${worldname} ${worldtype}"
 
 #### LinuxGSM Settings ####

+ 2 - 2
lgsm/modules/fix_samp.sh

@@ -16,8 +16,8 @@ if [ -f "${servercfgfullpath}" ]; then
 		fixname="change default rcon password"
 		fn_fix_msg_start
 		fn_script_log_info "changing rcon/admin password."
-		random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs)
-		rconpass="admin${random}"
+		randomstring=$(tr -dc A-Za-z0-9 < /dev/urandom 2> /dev/null | head -c 8 | xargs)
+		rconpass="admin${randomstring}"
 		sed -i "s/rcon_password changeme/rcon_password ${rconpass}/g" "${servercfgfullpath}"
 		fn_fix_msg_end
 	fi

+ 2 - 2
lgsm/modules/update_mcb.sh

@@ -50,10 +50,10 @@ fn_update_localbuild() {
 
 fn_update_remotebuild() {
 	# Random number for userAgent
-	randnum=$((1 + RANDOM % 5000))
+	randomint=$(tr -dc 0-9 < /dev/urandom 2> /dev/null | head -c 4 | xargs)
 	# Get remote build info.
 	if [ "${mcversion}" == "latest" ]; then
-		remotebuildversion=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]")
+		remotebuildversion=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randomint}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]")
 	else
 		remotebuildversion="${mcversion}"
 	fi