diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index 923865478d..e824dbbb6d 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/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 #### diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index 5ab7c32832..79ccfa57dc 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/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 #### diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg index 463e808ed8..0e547035ad 100644 --- a/lgsm/config-default/config-lgsm/stnserver/_default.cfg +++ b/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 #### diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index eef67827fa..6fc593baa9 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/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 #### diff --git a/lgsm/modules/fix_samp.sh b/lgsm/modules/fix_samp.sh index 461d92aee7..b503fa84a4 100644 --- a/lgsm/modules/fix_samp.sh +++ b/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 diff --git a/lgsm/modules/update_mcb.sh b/lgsm/modules/update_mcb.sh index f3a802e9e4..b95d6d9e42 100644 --- a/lgsm/modules/update_mcb.sh +++ b/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