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

Better place to remove the lockfile

UltimateByte 8 лет назад
Родитель
Сommit
aa31cdb74b
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      lgsm/functions/command_stop.sh

+ 4 - 2
lgsm/functions/command_stop.sh

@@ -261,8 +261,6 @@ fn_stop_tmux(){
 	sleep 0.5
 	sleep 0.5
 	check_status.sh
 	check_status.sh
 	if [ "${status}" == "0" ]; then
 	if [ "${status}" == "0" ]; then
-		# Remove lockfile
-		rm -f "${rootdir}/${lockselfname}"
 		# ARK doesn't clean up immediately after tmux is killed.
 		# ARK doesn't clean up immediately after tmux is killed.
 		# Make certain the ports are cleared before continuing.
 		# Make certain the ports are cleared before continuing.
 		if [ "${gamename}" == "ARK: Survival Evolved" ]; then
 		if [ "${gamename}" == "ARK: Survival Evolved" ]; then
@@ -299,4 +297,8 @@ sleep 0.5
 check.sh
 check.sh
 info_config.sh
 info_config.sh
 fn_stop_pre_check
 fn_stop_pre_check
+# Remove lockfile
+if [ -f "${rootdir}/${lockselfname}" ]; then
+	rm -f "${rootdir}/${lockselfname}"
+fi
 core_exit.sh
 core_exit.sh