From aa31cdb74b69c8e8c1fbcca3331aa5b4fba2c432 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 16 Apr 2018 04:27:18 +0200 Subject: [PATCH] Better place to remove the lockfile --- lgsm/functions/command_stop.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index b35700aab..7b8ce1597 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -261,8 +261,6 @@ fn_stop_tmux(){ sleep 0.5 check_status.sh if [ "${status}" == "0" ]; then - # Remove lockfile - rm -f "${rootdir}/${lockselfname}" # ARK doesn't clean up immediately after tmux is killed. # Make certain the ports are cleared before continuing. if [ "${gamename}" == "ARK: Survival Evolved" ]; then @@ -299,4 +297,8 @@ sleep 0.5 check.sh info_config.sh fn_stop_pre_check +# Remove lockfile +if [ -f "${rootdir}/${lockselfname}" ]; then + rm -f "${rootdir}/${lockselfname}" +fi core_exit.sh