Browse Source

add condition for starting jk3server in tmux

pull/3891/head
AlexCS1337 8 months ago
parent
commit
df9abefa37
  1. 9
      lgsm/modules/command_start.sh
  2. 4
      lgsm/modules/update_jk3.sh

9
lgsm/modules/command_start.sh

@ -18,6 +18,13 @@ fn_start_jk2() {
tmux -L "${socketname}" end -t "${sessionname}" version ENTER > /dev/null 2>&1
}
# Like above but for Jedi Academy version to be printed in console on start.
# Used to allow update to detect OpenJK server version.
fn_start_jk3() {
fn_start_tmux
tmux -L "${socketname}" end -t "${sessionname}" version ENTER > /dev/null 2>&1
}
fn_start_tmux() {
# check for tmux size variables.
if [[ "${servercfgtmuxwidth}" =~ ^[0-9]+$ ]]; then
@ -199,6 +206,8 @@ fi
fn_print_dots "${servername}"
if [ "${shortname}" == "jk2" ]; then
fn_start_jk2
elif [ "$shortname" == "jk3" ]; then
fn_start_jk3
else
fn_start_tmux
fi

4
lgsm/modules/update_jk3.sh

@ -1,9 +1,9 @@
#!/bin/bash
# LinuxGSM update_jk2.sh module
# LinuxGSM update_jk3.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Handles updating of Jedi Knight 2 servers.
# Description: Handles updating of Jedi Academy servers.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

Loading…
Cancel
Save