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

Adjusted to run on specific commands

Daniel Gibbs 10 лет назад
Родитель
Сommit
37c3f7f2e2
2 измененных файлов с 8 добавлено и 4 удалено
  1. 7 3
      functions/check.sh
  2. 1 1
      functions/check_config.sh

+ 7 - 3
functions/check.sh

@@ -61,6 +61,10 @@ do
 	fi
 done
 
-if [ "${function_selfname}" != "command_install.sh" ]; then
-	check_config.sh
-fi
+local allowed_commands_array=( command_console.sh command_debug.sh command_details.sh command_monitor.sh command_start.sh command_stop.sh )
+for allowed_command in "${allowed_commands_array[@]}"
+do
+	if [ "${allowed_command}" == "${function_selfname}" ]; then
+		check_config.sh
+	fi
+done

+ 1 - 1
functions/check_config.sh

@@ -8,7 +8,7 @@ lgsm_version="060116"
 
 if [ ! -e "${servercfgfullpath}" ]; then
 	if [ "${gamename}" != "Hurtworld" ]; then
-		fn_printwarnnl "Configuration file missing!"
+		fn_printwarnnl "Config file missing!"
 		echo "${servercfgfullpath}"
 		fn_scriptlog "Configuration file missing!"
 		fn_scriptlog "${servercfgfullpath}"