Skip to content

Fix(tmux): better tmux session handling for multiple instance on same server / user session #3767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 20, 2023

Conversation

cclecle
Copy link
Contributor

@cclecle cclecle commented Jan 29, 2022

Description

Force tmux to create a new trmux server instance for each game instance to avoid sharing same pid.
This allow systemd to differentiate games server instance correctly.

Update consist to change:
tmux <some options>
with:
tmux -L "${sessionname}" <some options>

Fixes #3763

Type of change

  • Bug fix (a change which fixes an issue).
  • New feature (change which adds functionality).
  • New Server (new server added).
  • Refactor (restructures existing code).
  • Comment update (typo, spelling, explanation, examples, etc).

Checklist

PR will not be merged until all steps are complete.

  • This pull request links to an issue.
  • This pull request uses the develop branch as its base.
  • This pull request Subject follows the Conventional Commits standard.
  • This code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have checked that this code is commented where required.
  • I have provided a detailed with enough description of this PR.
  • I have checked If documentation needs updating.

Documentation

No update needed.

@cclecle cclecle changed the title Fix tmux session handling for multiple instance on same server / user session Fix(tmux): better tmux session handling for multiple instance on same server / user session Jan 29, 2022
@h3o66
Copy link
Member

h3o66 commented Feb 9, 2022

Not sure about this one.
@dgibbs64 please have a look

@h3o66 h3o66 requested a review from dgibbs64 February 9, 2022 22:34
@dgibbs64
Copy link
Member

dgibbs64 commented Feb 9, 2022

Caution needs to happen with tmux changes. Problems have occurred before. I will need to review and test :)

dgibbs64 added 2 commits July 20, 2023 21:41
This commit refactors the code to improve consistency in the usage of the `tmux` command. It adds the `-L` flag followed by the session name to all `tmux` commands. This ensures that all commands are executed within the correct session. Additionally, it updates the `check_status.sh`, `command_console.sh`, `command_send.sh`, `command_start.sh`, `command_stop.sh`, and `info_distro.sh` files to include this change.

The changes ensure that all relevant commands are executed within the specified session, improving code readability and maintainability.
@dgibbs64 dgibbs64 added this to the v23.4.0 milestone Jul 20, 2023
@dgibbs64 dgibbs64 merged commit e9f2453 into GameServerManagers:develop Jul 20, 2023
@cclecle cclecle deleted the develop branch July 21, 2023 07:36
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants