Skip to content

Commit bd08aff

Browse files
authored
fix(kf2): create the KFGame/Cache map-load directory on install (#5108)
The KF2 Linux dedicated server never creates KFGame/Cache, which it needs when it loads maps, Workshop maps included. Create it during install once KFGame exists.
1 parent a1bdac1 commit bd08aff

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎lgsm/modules/fix_kf2.sh‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,14 @@ fn_sleep_time_10
1717
exitbypass=1
1818
command_stop.sh
1919
fn_firstcommand_reset
20+
21+
# The KF2 Linux dedicated server does not create KFGame/Cache, the directory it
22+
# uses when loading maps (including Workshop maps). The KF2 wiki lists this as a
23+
# known Linux issue and the remedy as `mkdir -p KFGame/Cache`. Creating it after
24+
# install, only once KFGame exists, keeps it present after every install.
25+
if [ -d "${serverfiles}/KFGame" ] && [ ! -d "${serverfiles}/KFGame/Cache" ]; then
26+
fixname="KFGame/Cache directory"
27+
fn_fix_msg_start
28+
mkdir -p "${serverfiles}/KFGame/Cache"
29+
fn_fix_msg_end
30+
fi

0 commit comments

Comments
 (0)