Browse Source

Merge pull request #1378 from GameServerManagers/bug/1377

#1377 - Fixes an issue with compiled copies of tmux
pull/1433/head
Daniel Gibbs 8 years ago
committed by GitHub
parent
commit
ea9564026b
  1. 4
      lgsm/functions/command_start.sh
  2. 8
      lgsm/functions/info_distro.sh

4
lgsm/functions/command_start.sh

@ -96,13 +96,13 @@ fn_start_tmux(){
tmux new-session -d -x "${sessionheight}" -y "${sessionwidth}" -s "${servicename}" "${executable} ${parms}" 2> "${scriptlogdir}/.${servicename}-tmux-error.tmp" tmux new-session -d -x "${sessionheight}" -y "${sessionwidth}" -s "${servicename}" "${executable} ${parms}" 2> "${scriptlogdir}/.${servicename}-tmux-error.tmp"
# tmux pipe-pane not supported in tmux versions < 1.6 # tmux pipe-pane not supported in tmux versions < 1.6
if [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -lt "16" ]; then if [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -lt "16" ] 2>/dev/null; then # Tmux compiled from source will not return a number, therefore bypass this check and trash the error
echo "Console logging disabled: Tmux => 1.6 required echo "Console logging disabled: Tmux => 1.6 required
https://gameservermanagers.com/tmux-upgrade https://gameservermanagers.com/tmux-upgrade
Currently installed: $(tmux -V)" > "${consolelog}" Currently installed: $(tmux -V)" > "${consolelog}"
# Console logging disabled: Bug in tmux 1.8 breaks logging # Console logging disabled: Bug in tmux 1.8 breaks logging
elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -eq "18" ]; then elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -eq "18" ] 2>/dev/null; then
echo "Console logging disabled: Bug in tmux 1.8 breaks logging echo "Console logging disabled: Bug in tmux 1.8 breaks logging
https://gameservermanagers.com/tmux-upgrade https://gameservermanagers.com/tmux-upgrade
Currently installed: $(tmux -V)" > "${consolelog}" Currently installed: $(tmux -V)" > "${consolelog}"

8
lgsm/functions/info_distro.sh

@ -37,12 +37,14 @@ glibcversion="$(ldd --version | sed -n '1s/.* //p')"
## tmux version ## tmux version
# e.g: tmux 1.6 # e.g: tmux 1.6
if [ -z "$(command -v tmux)" ]; then if [ -z "$(command -V tmux)" ]; then
tmuxv="${red}NOT INSTALLED!${default}" tmuxv="${red}NOT INSTALLED!${default}"
elif [ "$(tmux -V|sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -lt "16" ]; then
tmuxv="$(tmux -V) (>= 1.6 required for console log)"
else else
if [ "$(tmux -V|sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -lt "16" ] 2>/dev/null; then
tmuxv="$(tmux -V) (>= 1.6 required for console log)"
else
tmuxv=$(tmux -V) tmuxv=$(tmux -V)
fi
fi fi
## Uptime ## Uptime

Loading…
Cancel
Save