Daniel Gibbs 10 лет назад
Родитель
Сommit
eed7bad25a
2 измененных файлов с 5 добавлено и 4 удалено
  1. 2 1
      lgsm/functions/command_restart.sh
  2. 3 3
      lgsm/functions/core_exit.sh

+ 2 - 1
lgsm/functions/command_restart.sh

@@ -8,7 +8,8 @@ local commandnane="RESTART"
 local commandaction="Restarting"
 local commandaction="Restarting"
 local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 
-exitbypass=1
 info_config.sh
 info_config.sh
+exitbypass=1
 command_stop.sh
 command_stop.sh
+exitbypass=1
 command_start.sh
 command_start.sh

+ 3 - 3
lgsm/functions/core_exit.sh

@@ -11,7 +11,9 @@ fn_exit_dev_debug(){
 	fi
 	fi
 }
 }
 
 
-if [ -n "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then
+if [ -n "${exitbypass}" ]; then
+	unset exitbypass
+elif [ -n "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then
 	if [ "${exitcode}" == "1" ]; then
 	if [ "${exitcode}" == "1" ]; then
 		fn_script_log_fatal "${selfname} exiting with code: ${exitcode}"
 		fn_script_log_fatal "${selfname} exiting with code: ${exitcode}"
 	elif [ "${exitcode}" == "2" ]; then
 	elif [ "${exitcode}" == "2" ]; then
@@ -25,8 +27,6 @@ if [ -n "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then
 	# remove trap.
 	# remove trap.
 	trap - INT
 	trap - INT
 	exit ${exitcode}
 	exit ${exitcode}
-elif [ -n "${exitbypass}" ]; then
-	unset exitbypass
 else
 else
 	exitcode=0
 	exitcode=0
 	fn_script_log_pass "${selfname} exiting with code: ${exitcode}"
 	fn_script_log_pass "${selfname} exiting with code: ${exitcode}"