From 3d6c92ba05b05370adf3f21f85ef4a2ace9e7037 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 30 Jul 2023 21:12:12 +0100 Subject: [PATCH] feat: add exitbypass flag to prevent lingering tmux sessions The code changes in `command_start.sh` include adding an `exitbypass` flag to prevent lingering tmux sessions. This flag is used to stop the running server before creating a unique uid for the tmux socket name. --- lgsm/modules/command_start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index f674c896c..7713ee99a 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -53,6 +53,7 @@ fn_start_tmux() { # Create uid to ensure unique tmux socket name. if [ ! -f "${datadir}/${selfname}.uid" ]; then # stop running server (if running) to prevent lingering tmux sessions. + exitbypass=1 command_stop.sh uid=$(date '+%s' | sha1sum | head -c 8) echo "${uid}" > "${datadir}/${selfname}.uid"