add condition for starting jk3server in tmux

This commit is contained in:
AlexCS1337 2024-07-27 13:13:37 +10:00
parent 0a3277a549
commit df9abefa37
2 changed files with 11 additions and 2 deletions

View File

@ -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

View File

@ -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]}")")"