Просмотр исходного кода

fix(luanti): fetch the default config from Game-Server-Configs (#5215)

Install minetest.conf.example with fn_default_config_remote like other games instead of copying it from the server files, then append the LinuxGSM settings on a fresh install only.
Daniel Gibbs 2 дней назад
Родитель
Сommit
1944125a81
1 измененных файлов с 7 добавлено и 3 удалено
  1. 7 3
      lgsm/modules/install_config.sh

+ 7 - 3
lgsm/modules/install_config.sh

@@ -257,9 +257,13 @@ fn_list_config_locations() {
 }
 
 if [ "${shortname}" == "luanti" ]; then
-	fn_check_cfgdir
-	if [ ! -e "${servercfgfullpath}" ] && [ ! -L "${servercfgfullpath}" ]; then
-		cp "${serverfiles}/${servercfgdefault}" "${servercfgfullpath}"
+	luanticfgexisted="0"
+	if [ -e "${servercfgfullpath}" ] || [ -L "${servercfgfullpath}" ]; then
+		luanticfgexisted="1"
+	fi
+	array_configs+=(minetest.conf.example)
+	fn_default_config_remote
+	if [ "${luanticfgexisted}" == "0" ] && [ -f "${servercfgfullpath}" ]; then
 		{
 			echo "server_name = LinuxGSM"
 			echo "name = admin"