Skip to content

Commit

Permalink
add condition for starting jk3server in tmux
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCS1337 committed Jul 27, 2024
1 parent 0a3277a commit df9abef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions lgsm/modules/command_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lgsm/modules/update_jk3.sh
Original file line number Diff line number Diff line change
@@ -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]}")")"

Expand Down

0 comments on commit df9abef

Please sign in to comment.