Explorar o código

refactor: simplify config file copying and error handling

This commit simplifies the code for copying default config files from the Game-Server-Configs repository to the server's config location. It also improves error handling by printing appropriate messages and logging them.
Daniel Gibbs %!s(int64=2) %!d(string=hai) anos
pai
achega
b6278c7338
Modificáronse 1 ficheiros con 21 adicións e 123 borrados
  1. 21 123
      lgsm/modules/install_config.sh

+ 21 - 123
lgsm/modules/install_config.sh

@@ -10,14 +10,22 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 # Checks if server cfg dir exists, creates it if it doesn't.
 # Checks if server cfg dir exists, creates it if it doesn't.
 fn_check_cfgdir() {
 fn_check_cfgdir() {
 	if [ ! -d "${servercfgdir}" ]; then
 	if [ ! -d "${servercfgdir}" ]; then
-		echo -e "creating ${servercfgdir} config directory."
-		fn_script_log_info "creating ${servercfgdir} config directory."
+		echo -en "creating ${servercfgdir} config directory"
 		mkdir -pv "${servercfgdir}"
 		mkdir -pv "${servercfgdir}"
+		if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181
+			fn_print_fail_eol
+			fn_script_log_fatal "creating ${servercfgdir} config directory"
+			core_exit.sh
+		else
+			fn_print_ok_eol
+			fn_script_log_pass "creating ${servercfgdir} config directory"
+		fi
 	fi
 	fi
 }
 }
 
 
+# Copys default configs from Game-Server-Configs repo to server config location.
 # Downloads default configs from Game-Server-Configs repo to lgsm/config-default.
 # Downloads default configs from Game-Server-Configs repo to lgsm/config-default.
-fn_fetch_default_config() {
+fn_default_config_remote() {
 	echo -e ""
 	echo -e ""
 	echo -e "${bold}${lightyellow}Downloading ${gamename} Configs${default}"
 	echo -e "${bold}${lightyellow}Downloading ${gamename} Configs${default}"
 	echo -e "${bold}=================================${default}"
 	echo -e "${bold}=================================${default}"
@@ -30,16 +38,10 @@ fn_fetch_default_config() {
 	for config in "${array_configs[@]}"; do
 	for config in "${array_configs[@]}"; do
 		fn_fetch_file "${githuburl}/${shortname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nohash"
 		fn_fetch_file "${githuburl}/${shortname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nohash"
 	done
 	done
-}
 
 
-# Copys default configs from Game-Server-Configs repo to server config location.
-# TODO: no error checking in place currently
-fn_default_config_remote() {
 	for config in "${array_configs[@]}"; do
 	for config in "${array_configs[@]}"; do
 		# every config is copied
 		# every config is copied
-		echo -en "copying config file [ ${config} ]"
-		fn_sleep_time
-		fn_script_log_info "copying config file ${config}"
+		echo -en "copying config file [ ${italic}${config}${default} ]"
 		if [ "${config}" == "${servercfgdefault}" ]; then
 		if [ "${config}" == "${servercfgdefault}" ]; then
 			mkdir -p "${servercfgdir}"
 			mkdir -p "${servercfgdir}"
 			cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}"
 			cp -nv "${lgsmdir}/config-default/config-game/${config}" "${servercfgfullpath}"
@@ -65,7 +67,7 @@ fn_default_config_remote() {
 
 
 # Copys local default config to server config location.
 # Copys local default config to server config location.
 fn_default_config_local() {
 fn_default_config_local() {
-	echo -e "copying config file [ ${servercfgdefault} ]"
+	echo -en "copying config file [ ${italic}${servercfgdefault}${default} ]"
 	cp -nv "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}"
 	cp -nv "${servercfgdir}/${servercfgdefault}" "${servercfgfullpath}"
 	if [ "${exitcode}" != 0 ]; then
 	if [ "${exitcode}" != 0 ]; then
 		fn_print_fail_eol
 		fn_print_fail_eol
@@ -86,9 +88,8 @@ fn_set_config_vars() {
 		rconpass="admin${random}"
 		rconpass="admin${random}"
 
 
 		echo -en "changing server name"
 		echo -en "changing server name"
-		fn_script_log_info "changing server name"
-		# prevents var from being overwritten with the servername.
 		changes=""
 		changes=""
+		# prevents var from being overwritten with the servername.
 		if grep -q "SERVERNAME=SERVERNAME" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then
 		if grep -q "SERVERNAME=SERVERNAME" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then
 			changes+=$(sed -i "s/SERVERNAME=SERVERNAME/SERVERNAME=${servername}/g w /dev/stdout" "${servercfgfullpath}")
 			changes+=$(sed -i "s/SERVERNAME=SERVERNAME/SERVERNAME=${servername}/g w /dev/stdout" "${servercfgfullpath}")
 		elif grep -q "SERVERNAME=\"SERVERNAME\"" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then
 		elif grep -q "SERVERNAME=\"SERVERNAME\"" "${lgsmdir}/config-default/config-game/${config}" 2> /dev/null; then
@@ -98,24 +99,28 @@ fn_set_config_vars() {
 		fi
 		fi
 		if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181
 		if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181
 			fn_print_fail_eol
 			fn_print_fail_eol
+			fn_script_log_fatal "changing server name"
 		elif [ "$changes" != "" ]; then
 		elif [ "$changes" != "" ]; then
 			fn_print_ok_eol_nl
 			fn_print_ok_eol_nl
+			fn_script_log_pass "changing server name"
 		else
 		else
 			fn_print_skip_eol_nl
 			fn_print_skip_eol_nl
 		fi
 		fi
 		unset changes
 		unset changes
 
 
 		echo -en "changing rcon/admin password"
 		echo -en "changing rcon/admin password"
-		fn_script_log_info "changing rcon/admin password"
+		changes=""
 		if [ "${shortname}" == "squad" ]; then
 		if [ "${shortname}" == "squad" ]; then
-			sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgdir}/Rcon.cfg"
+			changes+=$(sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgdir}/Rcon.cfg")
 		else
 		else
-			sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}"
+			changes+=$(sed -i "s/ADMINPASSWORD/${rconpass}/g" "${servercfgfullpath}")
 		fi
 		fi
 		if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181
 		if [ "$?" -ne 0 ]; then # shellcheck disable=SC2181
 			fn_print_fail_eol
 			fn_print_fail_eol
+			fn_script_log_fatal "changing rcon/admin password"
 		elif [ "$changes" != "" ]; then
 		elif [ "$changes" != "" ]; then
 			fn_print_ok_eol_nl
 			fn_print_ok_eol_nl
+			fn_script_log_pass "changing rcon/admin password"
 		else
 		else
 			fn_print_skip_eol_nl
 			fn_print_skip_eol_nl
 		fi
 		fi
@@ -196,254 +201,213 @@ if [ "${shortname}" == "sdtd" ]; then
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ac" ]; then
 elif [ "${shortname}" == "ac" ]; then
 	array_configs+=(server_cfg.ini)
 	array_configs+=(server_cfg.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ahl" ]; then
 elif [ "${shortname}" == "ahl" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ahl2" ]; then
 elif [ "${shortname}" == "ahl2" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ark" ]; then
 elif [ "${shortname}" == "ark" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(GameUserSettings.ini)
 	array_configs+=(GameUserSettings.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "arma3" ]; then
 elif [ "${shortname}" == "arma3" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(server.cfg network.cfg)
 	array_configs+=(server.cfg network.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "armar" ]; then
 elif [ "${shortname}" == "armar" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(server.json)
 	array_configs+=(server.json)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ats" ]; then
 elif [ "${shortname}" == "ats" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(server_config.sii)
 	array_configs+=(server_config.sii)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "bo" ]; then
 elif [ "${shortname}" == "bo" ]; then
 	array_configs+=(config.txt)
 	array_configs+=(config.txt)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "bd" ]; then
 elif [ "${shortname}" == "bd" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "bt" ]; then
 elif [ "${shortname}" == "bt" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(serversettings.xml)
 	array_configs+=(serversettings.xml)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "btl" ]; then
 elif [ "${shortname}" == "btl" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(DefaultGame.ini)
 	array_configs+=(DefaultGame.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "bf1942" ]; then
 elif [ "${shortname}" == "bf1942" ]; then
 	array_configs+=(serversettings.con)
 	array_configs+=(serversettings.con)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "bfv" ]; then
 elif [ "${shortname}" == "bfv" ]; then
 	array_configs+=(serversettings.con)
 	array_configs+=(serversettings.con)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "bs" ]; then
 elif [ "${shortname}" == "bs" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "bb" ]; then
 elif [ "${shortname}" == "bb" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "bb2" ]; then
 elif [ "${shortname}" == "bb2" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "bmdm" ]; then
 elif [ "${shortname}" == "bmdm" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "cd" ]; then
 elif [ "${shortname}" == "cd" ]; then
 	array_configs+=(properties.json)
 	array_configs+=(properties.json)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ck" ]; then
 elif [ "${shortname}" == "ck" ]; then
 	array_configs+=(ServerConfig.json)
 	array_configs+=(ServerConfig.json)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "cod" ]; then
 elif [ "${shortname}" == "cod" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "coduo" ]; then
 elif [ "${shortname}" == "coduo" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "cod2" ]; then
 elif [ "${shortname}" == "cod2" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "cod4" ]; then
 elif [ "${shortname}" == "cod4" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "codwaw" ]; then
 elif [ "${shortname}" == "codwaw" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "cc" ]; then
 elif [ "${shortname}" == "cc" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "col" ]; then
 elif [ "${shortname}" == "col" ]; then
 	array_configs+=(colserver.json)
 	array_configs+=(colserver.json)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "cs" ]; then
 elif [ "${shortname}" == "cs" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "cscz" ]; then
 elif [ "${shortname}" == "cscz" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "csgo" ]; then
 elif [ "${shortname}" == "csgo" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "css" ]; then
 elif [ "${shortname}" == "css" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ct" ]; then
 elif [ "${shortname}" == "ct" ]; then
 	array_configs+=(ServerSetting.ini)
 	array_configs+=(ServerSetting.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "dayz" ]; then
 elif [ "${shortname}" == "dayz" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "dod" ]; then
 elif [ "${shortname}" == "dod" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "dodr" ]; then
 elif [ "${shortname}" == "dodr" ]; then
 	array_configs+=(Game.ini)
 	array_configs+=(Game.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "dods" ]; then
 elif [ "${shortname}" == "dods" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "doi" ]; then
 elif [ "${shortname}" == "doi" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "dmc" ]; then
 elif [ "${shortname}" == "dmc" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "dst" ]; then
 elif [ "${shortname}" == "dst" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(cluster.ini server.ini)
 	array_configs+=(cluster.ini server.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_dst_config_vars
 	fn_set_dst_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "dab" ]; then
 elif [ "${shortname}" == "dab" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "dys" ]; then
 elif [ "${shortname}" == "dys" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "eco" ]; then
 elif [ "${shortname}" == "eco" ]; then
 	array_configs+=(Network.eco)
 	array_configs+=(Network.eco)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
@@ -452,191 +416,160 @@ elif [ "${shortname}" == "em" ]; then
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "etl" ]; then
 elif [ "${shortname}" == "etl" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ets2" ]; then
 elif [ "${shortname}" == "ets2" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(server_config.sii)
 	array_configs+=(server_config.sii)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "fctr" ]; then
 elif [ "${shortname}" == "fctr" ]; then
 	array_configs+=(server-settings.json)
 	array_configs+=(server-settings.json)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "fof" ]; then
 elif [ "${shortname}" == "fof" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "gmod" ]; then
 elif [ "${shortname}" == "gmod" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "hldm" ]; then
 elif [ "${shortname}" == "hldm" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "hldms" ]; then
 elif [ "${shortname}" == "hldms" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ohd" ]; then
 elif [ "${shortname}" == "ohd" ]; then
 	array_configs+=(Game.ini)
 	array_configs+=(Game.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "opfor" ]; then
 elif [ "${shortname}" == "opfor" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "hl2dm" ]; then
 elif [ "${shortname}" == "hl2dm" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ins" ]; then
 elif [ "${shortname}" == "ins" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ios" ]; then
 elif [ "${shortname}" == "ios" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "jc2" ]; then
 elif [ "${shortname}" == "jc2" ]; then
 	array_configs+=(config.lua)
 	array_configs+=(config.lua)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "jc3" ]; then
 elif [ "${shortname}" == "jc3" ]; then
 	array_configs+=(config.json)
 	array_configs+=(config.json)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "kf" ]; then
 elif [ "${shortname}" == "kf" ]; then
 	array_configs+=(Default.ini)
 	array_configs+=(Default.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "l4d" ]; then
 elif [ "${shortname}" == "l4d" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "l4d2" ]; then
 elif [ "${shortname}" == "l4d2" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then
 elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ]; then
 	array_configs+=(server.properties)
 	array_configs+=(server.properties)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "mcb" ]; then
 elif [ "${shortname}" == "mcb" ]; then
 	array_configs+=(server.properties)
 	array_configs+=(server.properties)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "mohaa" ]; then
 elif [ "${shortname}" == "mohaa" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "mh" ]; then
 elif [ "${shortname}" == "mh" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(Game.ini)
 	array_configs+=(Game.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ns" ]; then
 elif [ "${shortname}" == "ns" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "nmrih" ]; then
 elif [ "${shortname}" == "nmrih" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "nd" ]; then
 elif [ "${shortname}" == "nd" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "mta" ]; then
 elif [ "${shortname}" == "mta" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(acl.xml mtaserver.conf vehiclecolors.conf)
 	array_configs+=(acl.xml mtaserver.conf vehiclecolors.conf)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shotname}" == "mom" ]; then
 elif [ "${shotname}" == "mom" ]; then
 	array_configs+=(DedicatedServerConfig.cfg)
 	array_configs+=(DedicatedServerConfig.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "pvr" ]; then
 elif [ "${shortname}" == "pvr" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(Game.ini)
 	array_configs+=(Game.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 elif [ "${shortname}" == "pvkii" ]; then
 elif [ "${shortname}" == "pvkii" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "pz" ]; then
 elif [ "${shortname}" == "pz" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(server.ini)
 	array_configs+=(server.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "nec" ]; then
 elif [ "${shortname}" == "nec" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "pc" ]; then
 elif [ "${shortname}" == "pc" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
@@ -645,168 +578,140 @@ elif [ "${shortname}" == "pc2" ]; then
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "q2" ]; then
 elif [ "${shortname}" == "q2" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "q3" ]; then
 elif [ "${shortname}" == "q3" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ql" ]; then
 elif [ "${shortname}" == "ql" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "jk2" ]; then
 elif [ "${shortname}" == "jk2" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 elif [ "${shortname}" == "qw" ]; then
 elif [ "${shortname}" == "qw" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ricochet" ]; then
 elif [ "${shortname}" == "ricochet" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "rtcw" ]; then
 elif [ "${shortname}" == "rtcw" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "rust" ]; then
 elif [ "${shortname}" == "rust" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then
 elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then
 	array_configs+=(config_gameplay.txt config_localadmin.txt)
 	array_configs+=(config_gameplay.txt config_localadmin.txt)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "sf" ]; then
 elif [ "${shortname}" == "sf" ]; then
 	array_configs+=(GameUserSettings.ini)
 	array_configs+=(GameUserSettings.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "sol" ]; then
 elif [ "${shortname}" == "sol" ]; then
 	array_configs+=(soldat.ini)
 	array_configs+=(soldat.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "sof2" ]; then
 elif [ "${shortname}" == "sof2" ]; then
 	array_configs+=(server.cfg mapcycle.txt)
 	array_configs+=(server.cfg mapcycle.txt)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "sfc" ]; then
 elif [ "${shortname}" == "sfc" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "squad" ]; then
 elif [ "${shortname}" == "squad" ]; then
 	array_configs+=(Admins.cfg Bans.cfg License.cfg Server.cfg Rcon.cfg)
 	array_configs+=(Admins.cfg Bans.cfg License.cfg Server.cfg Rcon.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "sb" ]; then
 elif [ "${shortname}" == "sb" ]; then
 	array_configs+=(starbound_server.config)
 	array_configs+=(starbound_server.config)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "stn" ]; then
 elif [ "${shortname}" == "stn" ]; then
 	array_configs+=(ServerConfig.txt ServerUsers.txt TpPresets.json UserPermissions.json)
 	array_configs+=(ServerConfig.txt ServerUsers.txt TpPresets.json UserPermissions.json)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "sven" ]; then
 elif [ "${shortname}" == "sven" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "tf2" ]; then
 elif [ "${shortname}" == "tf2" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "tfc" ]; then
 elif [ "${shortname}" == "tfc" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ti" ]; then
 elif [ "${shortname}" == "ti" ]; then
 	array_configs+=(Game.ini Engine.ini)
 	array_configs+=(Game.ini Engine.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ts" ]; then
 elif [ "${shortname}" == "ts" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ts3" ]; then
 elif [ "${shortname}" == "ts3" ]; then
 	array_configs+=(ts3server.ini)
 	array_configs+=(ts3server.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "tw" ]; then
 elif [ "${shortname}" == "tw" ]; then
 	array_configs+=(server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg)
 	array_configs+=(server.cfg ctf.cfg dm.cfg duel.cfg tdm.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "terraria" ]; then
 elif [ "${shortname}" == "terraria" ]; then
 	array_configs+=(serverconfig.txt)
 	array_configs+=(serverconfig.txt)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "tu" ]; then
 elif [ "${shortname}" == "tu" ]; then
 	fn_check_cfgdir
 	fn_check_cfgdir
 	array_configs+=(TowerServer.ini)
 	array_configs+=(TowerServer.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ut" ]; then
 elif [ "${shortname}" == "ut" ]; then
 	array_configs+=(Game.ini Engine.ini)
 	array_configs+=(Game.ini Engine.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ut2k4" ]; then
 elif [ "${shortname}" == "ut2k4" ]; then
 	array_configs+=(UT2004.ini)
 	array_configs+=(UT2004.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "ut99" ]; then
 elif [ "${shortname}" == "ut99" ]; then
 	array_configs+=(Default.ini)
 	array_configs+=(Default.ini)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
@@ -818,42 +723,35 @@ elif [ "${shortname}" == "vints" ]; then
 	:
 	:
 elif [ "${shortname}" == "vs" ]; then
 elif [ "${shortname}" == "vs" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "wet" ]; then
 elif [ "${shortname}" == "wet" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "wf" ]; then
 elif [ "${shortname}" == "wf" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "wmc" ]; then
 elif [ "${shortname}" == "wmc" ]; then
 	array_configs+=(config.yml)
 	array_configs+=(config.yml)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 elif [ "${shortname}" == "wurm" ]; then
 elif [ "${shortname}" == "wurm" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "zmr" ]; then
 elif [ "${shortname}" == "zmr" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations
 elif [ "${shortname}" == "zps" ]; then
 elif [ "${shortname}" == "zps" ]; then
 	array_configs+=(server.cfg)
 	array_configs+=(server.cfg)
-	fn_fetch_default_config
 	fn_default_config_remote
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_set_config_vars
 	fn_list_config_locations
 	fn_list_config_locations