Skip to content

Fixes #1154#1156

Closed
CasperAlant wants to merge 2 commits intoGameServerManagers:developmentfrom
CasperAlant:patch-1
Closed

Fixes #1154#1156
CasperAlant wants to merge 2 commits intoGameServerManagers:developmentfrom
CasperAlant:patch-1

Conversation

@CasperAlant
Copy link
Copy Markdown

Users are prevented from starting an LGSM server within a tmux session, unless the session was started by another user.

Users are prevented from starting an LGSM server within a tmux session, unless the session was started by another user.
@dgibbs64
Copy link
Copy Markdown
Member

This looks like a function has just been removed. There needs to also be a method for confirming that the user is not trying to use screen either.

Tmux also sets $TERM = "screen" which is why I removed it. This way tests for a screen session while still avoiding the issue in #1154.
http://serverfault.com/questions/257975/how-to-check-if-im-in-screen-session
@UltimateByte
Copy link
Copy Markdown
Contributor

UltimateByte commented Oct 25, 2016

Better :p
Maybe if [ -n "${TMUX}" ]&&[ -n "${STY}"] ?

(watch out i edited)

Edit2: Well nope, my bad, STY stands for screen, right ?
So what is the condition that would define your situation along with [ -n "${TMUX}" ] ?

@CasperAlant
Copy link
Copy Markdown
Author

CasperAlant commented Oct 26, 2016

${TMUX} is unset after logging in to the lgsm account. That is not what caused the problem.

The problem was that ${TERM} gets set to "screen" (both tmux and screen do this) and stays that way even after logging into the lgsm account. By simply checking for a screen session using the ${STY} variable, my problem is solved.

@UltimateByte
Copy link
Copy Markdown
Contributor

Well, checking ${STY} seems like a good option at first glance then. :)
What does ${STY} variable points to exactly ?

@CasperAlant
Copy link
Copy Markdown
Author

As per the screen manual, ${STY} holds information about the screen window manager or the "Alternate socket name." Screen checks it when a new screen is created and will make a new window instead of a nested screen if it is set.

@UltimateByte
Copy link
Copy Markdown
Contributor

I'll patch it using the new branch, no worries :)

UltimateByte added a commit that referenced this pull request Oct 27, 2016
dgibbs64 pushed a commit that referenced this pull request Oct 27, 2016
* Two # is now one block of settings & descriptions

* directories comments and logs naming

* dgibbs revision and root check

* Backup & Layout rework

* removed duplicate updateonstart

* Fixed missing space on [ERROR ]

[ ERROR ] instead of [ERROR ]

* Error space wasn't missing

Used to fit other comment sizes, i guess

* Anonymous login is now an info

Since login variable is removed for servers that don't need steam auth, this won't show a failure anymore but a simple info and anonymous login will be used.

* update_steamcmd.sh Check is now done out of functions

* solves hanging on update if steamuser is not set

* New gameserver layout & functionalities

* Better way to detect screen

As per #1154 and #1156

* Moved to LinuxGSM-DevTools

https://github.com/GameServerManagers/LinuxGSM-DevTools/blob/master/GameServer-Template/gameserver
dgibbs64 added a commit that referenced this pull request Oct 30, 2016
* If there are backups in backup dir. Fixes #1140

* mainly improves logging #1098

* Better logging, output & compatibility #1098

* fn_check_cfgdir for Rust fixes #1141

* fn_set_config_vars is not for every game

removing some games i know don't use it

* Install config if missing fixes #1142

* Clear more logs #1137

* Putting all this into functions & prepare noprompt

* noprompt & shutdownonbackup #1098

* fix syntax & messages #1098

* messages that make more sense #1098


* New backup vars

# Backup
maxbackups="4"
maxbackupdays="30"
stoponbackup="on"

* Should fix missing cached mem #1143

* fix the fix for #1143 (close double quote)

* move -type f before -mtime

* New gameservers & features (#1158)

* Two # is now one block of settings & descriptions

* directories comments and logs naming

* dgibbs revision and root check

* update_steamcmd.sh Check is now done out of functions

* Better way to detect screen #1154 and #1156

* Backup function improvements (#1161)

* Added no of days since last backup

* Added lock file creation to logs

* Improvements up command_backup.sh

Changes to the messages displayed on screen
added trap and improved lockfile support
renamed some functions
other misc changes

* Updated Version numbers
@lock
Copy link
Copy Markdown

lock Bot commented Jul 18, 2018

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

@lock lock Bot locked as resolved and limited conversation to collaborators Jul 18, 2018
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