Browse Source

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.
pull/4296/head
Daniel Gibbs 2 years ago
parent
commit
3d6c92ba05
  1. 1
      lgsm/modules/command_start.sh

1
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"

Loading…
Cancel
Save