diff --git a/Battlefield1942/bf1942server b/Battlefield1942/bf1942server index 72111ab81..14995f4cf 100644 --- a/Battlefield1942/bf1942server +++ b/Battlefield1942/bf1942server @@ -29,7 +29,7 @@ pushbullettoken="accesstoken" # Start Variables fn_parms(){ -parms=" +hostServer 1 +dedicated 1" +parms="+hostServer 1 +dedicated 1" } #### Advanced Variables #### diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index e3dac532f..dc7486c85 100644 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -328,7 +328,7 @@ fn_info_config_mumble(){ queryport=${queryport:-"64738"} servername="Mumble Port ${port}" - ip=$(cat "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/voice_ip//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + ip=$(grep "host=" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^;/d' -e 's/host=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') ipsetinconfig=1 ipinconfigvar="voice_ip" fi diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index 97d12c972..4a96330cd 100644 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -30,12 +30,21 @@ fn_set_config_vars(){ fn_script_log_info "changing hostname." sleep 1 sed -i "s/SERVERNAME/${servername}/g" "${servercfgfullpath}" - echo "changing rconpassword." - fn_script_log_info "changing RCON/ADMIN password." + echo "changing rcon/admin password." + fn_script_log_info "changing rcon/admin password." sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}" sleep 1 } +# Checks if cfg dir exists, creates it if it doesn't +fn_check_cfgdir(){ + if [ ! -d "${servercfgdir}" ]; then + echo "creating ${servercfgdir} config folder." + fn_script_log_info "creating ${servercfgdir} config folder." + mkdir -pv "${servercfgdir}" + fi +} + # Copys the default configs from Game-Server-Configs repo to the # correct location fn_default_config_remote(){ @@ -75,6 +84,7 @@ elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then fn_set_config_vars elif [ "${gamename}" == "ARMA 3" ]; then gamedirname="Arma3" + fn_check_cfgdir array_configs+=( server.cfg network.cfg ) fn_fetch_default_config fn_default_config_remote