Browse Source

add update jk3 module

also added jk3 to serverlistmenu
pull/3891/head
AlexCS1337 9 months ago
parent
commit
e28bb20490
  1. 1
      lgsm/data/almalinux-8.csv
  2. 1
      lgsm/data/almalinux-9.csv
  3. 1
      lgsm/data/centos-7.csv
  4. 1
      lgsm/data/centos-8.csv
  5. 1
      lgsm/data/centos-9.csv
  6. 1
      lgsm/data/debian-10.csv
  7. 1
      lgsm/data/debian-11.csv
  8. 1
      lgsm/data/debian-12.csv
  9. BIN
      lgsm/data/gameicons/jk3-icon.png
  10. 1
      lgsm/data/rhel-7.csv
  11. 1
      lgsm/data/rhel-8.csv
  12. 1
      lgsm/data/rocky-9.csv
  13. 136
      lgsm/data/serverlistmenu.csv
  14. 1
      lgsm/data/ubuntu-16.04.csv
  15. 1
      lgsm/data/ubuntu-18.04.csv
  16. 1
      lgsm/data/ubuntu-20.04.csv
  17. 1
      lgsm/data/ubuntu-22.04.csv
  18. 1
      lgsm/data/ubuntu-23.04.csv
  19. 1
      lgsm/data/ubuntu-23.10.csv
  20. 1
      lgsm/data/ubuntu-24.04.csv
  21. 166
      lgsm/modules/update_jk3.sh

1
lgsm/data/almalinux-8.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/almalinux-9.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/centos-7.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/centos-8.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/centos-9.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/debian-10.csv

@ -60,6 +60,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 4.

1
lgsm/data/debian-11.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/debian-12.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

BIN
lgsm/data/gameicons/jk3-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

1
lgsm/data/rhel-7.csv

@ -62,6 +62,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/rhel-8.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/rocky-9.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

136
lgsm/data/serverlistmenu.csv

@ -0,0 +1,136 @@
ac,acserver,Assetto Corsa
ahl,ahlserver,Action Half-Life
ahl2,ahl2server,Action: Source
ark,arkserver,ARK: Survival Evolved
arma3,arma3server,ARMA 3
armar,armarserver,Arma Reforger
ats,atsserver,American Truck Simulator
av,avserver,Avorion
bb,bbserver,BrainBread
bb2,bb2server,BrainBread 2
bd,bdserver,Base Defense
bf1942,bf1942server,Battlefield 1942
bfv,bfvserver,Battlefield: Vietnam
bmdm,bmdmserver,Black Mesa: Deathmatch
bo,boserver,Ballistic Overkill
bs,bsserver,Blade Symphony
bt,btserver,Barotrauma
btl,btlserver,BATTALION: Legacy
cc,ccserver,Codename CURE
ck,ckserver,Core Keeper
cmw,cmwserver,Chivalry: Medieval Warfare
cod,codserver,Call of Duty
cod2,cod2server,Call of Duty 2
cod4,cod4server,Call of Duty 4
coduo,coduoserver,Call of Duty: United Offensive
codwaw,codwawserver,Call of Duty: World at War
col,colserver,Colony Survival
cs,csserver,Counter-Strike 1.6
cs2,cs2server,Counter-Strike 2
cscz,csczserver,Counter-Strike: Condition Zero
csgo,csgoserver,Counter-Strike: Global Offensive
css,cssserver,Counter-Strike: Source
ct,ctserver,Craftopia
dab,dabserver,Double Action: Boogaloo
dayz,dayzserver,DayZ
dmc,dmcserver,Deathmatch Classic
dod,dodserver,Day of Defeat
dodr,dodrserver,Day of Dragons
dods,dodsserver,Day of Defeat: Source
doi,doiserver,Day of Infamy
dst,dstserver,Don't Starve Together
dys,dysserver,Dystopia
eco,ecoserver,Eco
em,emserver,Empires Mod
etl,etlserver,ET: Legacy
ets2,ets2server,Euro Truck Simulator 2
fctr,fctrserver,Factorio
fof,fofserver,Fistful of Frags
gmod,gmodserver,Garrys Mod
hcu,hcuserver,HYPERCHARGE: Unboxed
hl2dm,hl2dmserver,Half-Life 2: Deathmatch
hldm,hldmserver,Half-Life: Deathmatch
hldms,hldmsserver,Half-Life Deathmatch: Source
hw,hwserver,Hurtworld
hz,hzserver,Humanitz
ins,insserver,Insurgency
inss,inssserver,Insurgency: Sandstorm
ios,iosserver,IOSoccer
jc2,jc2server,Just Cause 2
jc3,jc3server,Just Cause 3
jk2,jk2server,Jedi Knight II: Jedi Outcast
kf,kfserver,Killing Floor
kf2,kf2server,Killing Floor 2
l4d,l4dserver,Left 4 Dead
l4d2,l4d2server,Left 4 Dead 2
mc,mcserver,Minecraft
mcb,mcbserver,Minecraft Bedrock
mh,mhserver,MORDHAU
mohaa,mohaaserver,Medal of Honor: Allied Assault
mom,momserver,Memories of Mars
mta,mtaserver,Multi Theft Auto
nd,ndserver,Nuclear Dawn
nec,necserver,Necesse
nmrih,nmrihserver,No More Room in Hell
ns,nsserver,Natural Selection
ns2,ns2server,Natural Selection 2
ns2c,ns2cserver,NS2: Combat
ohd,ohdserver,Operation: Harsh Doorstop
onset,onsetserver,Onset
opfor,opforserver,Opposing Force
pc,pcserver,Project Cars
pc2,pc2server,Project Cars 2
pmc,pmcserver,PaperMC
ps,psserver,Post Scriptum
pvkii,pvkiiserver,Pirates Vikings & Knights II
pvr,pvrserver,Pavlov VR
pw,pwserver,Palworld
pz,pzserver,Project Zomboid
q2,q2server,Quake 2
q3,q3server,Quake 3: Arena
q4,q4server,Quake 4
ql,qlserver,Quake Live
qw,qwserver,Quake World
ricochet,ricochetserver,Ricochet
ro,roserver,Red Orchestra: Ostfront 41-45
rtcw,rtcwserver,Return to Castle Wolfenstein
rust,rustserver,Rust
rw,rwserver,Rising World
samp,sampserver,San Andreas Multiplayer
sb,sbserver,Starbound
sbots,sbotsserver,StickyBots
scpsl,scpslserver,SCP: Secret Laboratory
scpslsm,scpslsmserver,SCP: Secret Laboratory ServerMod
sdtd,sdtdserver,7 Days to Die
sf,sfserver,Satisfactory
sfc,sfcserver,SourceForts Classic
sof2,sof2server,Soldier Of Fortune 2: Gold Edition
sol,solserver,Soldat
squad,squadserver,Squad
st,stserver,Stationeers
stn,stnserver,Survive the Nights
sven,svenserver,Sven Co-op
terraria,terrariaserver,Terraria
tf,tfserver,The Front
tf2,tf2server,Team Fortress 2
tfc,tfcserver,Team Fortress Classic
ti,tiserver,The Isle
ts,tsserver,The Specialists
ts3,ts3server,Teamspeak 3
tu,tuserver,Tower Unite
tw,twserver,Teeworlds
unt,untserver,Unturned
ut,utserver,Unreal Tournament
ut2k4,ut2k4server,Unreal Tournament 2004
ut3,ut3server,Unreal Tournament 3
ut99,ut99server,Unreal Tournament 99
vh,vhserver,Valheim
vints,vintsserver,Vintage Story
vpmc,vpmcserver,Velocity Proxy MC
vs,vsserver,Vampire Slayer
wet,wetserver,Wolfenstein: Enemy Territory
wf,wfserver,Warfork
wmc,wmcserver,WaterfallMC
wurm,wurmserver,Wurm Unlimited
zmr,zmrserver,Zombie Master: Reborn
zps,zpsserver,Zombie Panic! Source
1 ac acserver Assetto Corsa
2 ahl ahlserver Action Half-Life
3 ahl2 ahl2server Action: Source
4 ark arkserver ARK: Survival Evolved
5 arma3 arma3server ARMA 3
6 armar armarserver Arma Reforger
7 ats atsserver American Truck Simulator
8 av avserver Avorion
9 bb bbserver BrainBread
10 bb2 bb2server BrainBread 2
11 bd bdserver Base Defense
12 bf1942 bf1942server Battlefield 1942
13 bfv bfvserver Battlefield: Vietnam
14 bmdm bmdmserver Black Mesa: Deathmatch
15 bo boserver Ballistic Overkill
16 bs bsserver Blade Symphony
17 bt btserver Barotrauma
18 btl btlserver BATTALION: Legacy
19 cc ccserver Codename CURE
20 ck ckserver Core Keeper
21 cmw cmwserver Chivalry: Medieval Warfare
22 cod codserver Call of Duty
23 cod2 cod2server Call of Duty 2
24 cod4 cod4server Call of Duty 4
25 coduo coduoserver Call of Duty: United Offensive
26 codwaw codwawserver Call of Duty: World at War
27 col colserver Colony Survival
28 cs csserver Counter-Strike 1.6
29 cs2 cs2server Counter-Strike 2
30 cscz csczserver Counter-Strike: Condition Zero
31 csgo csgoserver Counter-Strike: Global Offensive
32 css cssserver Counter-Strike: Source
33 ct ctserver Craftopia
34 dab dabserver Double Action: Boogaloo
35 dayz dayzserver DayZ
36 dmc dmcserver Deathmatch Classic
37 dod dodserver Day of Defeat
38 dodr dodrserver Day of Dragons
39 dods dodsserver Day of Defeat: Source
40 doi doiserver Day of Infamy
41 dst dstserver Don't Starve Together
42 dys dysserver Dystopia
43 eco ecoserver Eco
44 em emserver Empires Mod
45 etl etlserver ET: Legacy
46 ets2 ets2server Euro Truck Simulator 2
47 fctr fctrserver Factorio
48 fof fofserver Fistful of Frags
49 gmod gmodserver Garrys Mod
50 hcu hcuserver HYPERCHARGE: Unboxed
51 hl2dm hl2dmserver Half-Life 2: Deathmatch
52 hldm hldmserver Half-Life: Deathmatch
53 hldms hldmsserver Half-Life Deathmatch: Source
54 hw hwserver Hurtworld
55 hz hzserver Humanitz
56 ins insserver Insurgency
57 inss inssserver Insurgency: Sandstorm
58 ios iosserver IOSoccer
59 jc2 jc2server Just Cause 2
60 jc3 jc3server Just Cause 3
61 jk2 jk2server Jedi Knight II: Jedi Outcast
62 kf kfserver Killing Floor
63 kf2 kf2server Killing Floor 2
64 l4d l4dserver Left 4 Dead
65 l4d2 l4d2server Left 4 Dead 2
66 mc mcserver Minecraft

1
lgsm/data/ubuntu-16.04.csv

@ -62,6 +62,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/ubuntu-18.04.csv

@ -62,6 +62,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/ubuntu-20.04.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/ubuntu-22.04.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/ubuntu-23.04.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/ubuntu-23.10.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

1
lgsm/data/ubuntu-24.04.csv

@ -61,6 +61,7 @@ ios
jc2
jc3
jk2
jk3
kf
kf2
l4d

Can't render this file because it has a wrong number of fields in line 2.

166
lgsm/modules/update_jk3.sh

@ -0,0 +1,166 @@
#!/bin/bash
# LinuxGSM update_jk2.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Handles updating of Jedi Knight 2 servers.
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_update_dl() {
# Download and extract files to serverfiles.
fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash"
fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}/GameData" "*"
fn_clear_tmp
}
fn_update_localbuild() {
# Gets local build info.
fn_print_dots "Checking local build: ${remotelocation}"
# Uses log file to get local build.
localbuild=$(grep "\"version\"" "${consolelogdir}"/* 2> /dev/null | sed 's/.*://' | awk '{print $1}' | head -n 1 | sed 's/v//')
if [ -z "${localbuild}" ]; then
fn_print_error "Checking local build: ${remotelocation}: missing local build info"
fn_script_log_error "Missing local build info"
fn_script_log_error "Set localbuild to 0"
localbuild="0"
else
fn_print_ok "Checking local build: ${remotelocation}"
fn_script_log_pass "Checking local build"
fi
}
fn_update_remotebuild() {
# Get remote build info.
apiurl="https://api.github.com/repos/JACoders/OpenJK/latest"
remotebuildresponse=$(curl -s "${apiurl}")
remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("OpenJK-linux")) | .name')
remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("OpenJK-linux")) | .browser_download_url')
remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name')
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"
# Checks if remotebuildversion variable has been set.
if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_fail "Checking remote build: ${remotelocation}"
fn_script_log_fail "Checking remote build"
core_exit.sh
else
fn_print_ok "Checking remote build: ${remotelocation}"
fn_script_log_pass "Checking remote build"
fi
else
# Checks if remotebuild variable has been set.
if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_failure "Unable to get remote build"
fn_script_log_fail "Unable to get remote build"
core_exit.sh
fi
fi
}
fn_update_compare() {
fn_print_dots "Checking for update: ${remotelocation}"
# Update has been found or force update.
if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then
# Create update lockfile.
date '+%s' > "${lockdir:?}/update.lock"
fn_print_ok_nl "Checking for update: ${remotelocation}"
echo -en "\n"
echo -e "Update available"
echo -e "* Local build: ${red}${localbuild}${default}"
echo -e "* Remote build: ${green}${remotebuildversion}${default}"
if [ -n "${branch}" ]; then
echo -e "* Branch: ${branch}"
fi
if [ -f "${rootdir}/.dev-debug" ]; then
echo -e "Remote build info"
echo -e "* apiurl: ${apiurl}"
echo -e "* remotebuildfilename: ${remotebuildfilename}"
echo -e "* remotebuildurl: ${remotebuildurl}"
echo -e "* remotebuildversion: ${remotebuildversion}"
fi
echo -en "\n"
fn_script_log_info "Update available"
fn_script_log_info "Local build: ${localbuild}"
fn_script_log_info "Remote build: ${remotebuildversion}"
if [ -n "${branch}" ]; then
fn_script_log_info "Branch: ${branch}"
fi
fn_script_log_info "${localbuild} > ${remotebuildversion}"
if [ "${commandname}" == "UPDATE" ]; then
unset updateonstart
check_status.sh
# If server stopped.
if [ "${status}" == "0" ]; then
fn_update_dl
if [ "${localbuild}" == "0" ]; then
exitbypass=1
command_start.sh
fn_firstcommand_reset
exitbypass=1
fn_sleep_time_5
command_stop.sh
fn_firstcommand_reset
fi
# If server started.
else
fn_print_restart_warning
exitbypass=1
command_stop.sh
fn_firstcommand_reset
exitbypass=1
fn_update_dl
exitbypass=1
command_start.sh
fn_firstcommand_reset
fi
unset exitbypass
date +%s > "${lockdir}/last-updated.lock"
alert="update"
elif [ "${commandname}" == "CHECK-UPDATE" ]; then
alert="check-update"
fi
alert.sh
else
fn_print_ok_nl "Checking for update: ${remotelocation}"
echo -en "\n"
echo -e "No update available"
echo -e "* Local build: ${green}${localbuild}${default}"
echo -e "* Remote build: ${green}${remotebuildversion}${default}"
if [ -n "${branch}" ]; then
echo -e "* Branch: ${branch}"
fi
echo -en "\n"
fn_script_log_info "No update available"
fn_script_log_info "Local build: ${localbuild}"
fn_script_log_info "Remote build: ${remotebuildversion}"
if [ -n "${branch}" ]; then
fn_script_log_info "Branch: ${branch}"
fi
if [ -f "${rootdir}/.dev-debug" ]; then
echo -e "Remote build info"
echo -e "* apiurl: ${apiurl}"
echo -e "* remotebuildfilename: ${remotebuildfilename}"
echo -e "* remotebuildurl: ${remotebuildurl}"
echo -e "* remotebuildversion: ${remotebuildversion}"
fi
fi
}
# The location where the builds are checked and downloaded.
remotelocation="github.com"
if [ "${firstcommandname}" == "INSTALL" ]; then
fn_update_remotebuild
fn_update_dl
else
update_steamcmd.sh
fn_print_dots "Checking for update"
fn_print_dots "Checking for update: ${remotelocation}"
fn_script_log_info "Checking for update: ${remotelocation}"
fn_update_localbuild
fn_update_remotebuild
fn_update_compare
fi
Loading…
Cancel
Save