diff --git a/CHANGELOG.md b/CHANGELOG.md index e795881..f51b6b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Add AlmaLinux, Fedora, Ubuntu support * Remove CentOS support +* Add GeoIP links in webadmin player list * Port installer and uninstaller to Ansible * Add `killinuxfloor apply` command * Update Node.js to 18 diff --git a/roles/install/files/serveradmin.patch b/roles/install/files/serveradmin.patch index d8855a1..19f7992 100644 --- a/roles/install/files/serveradmin.patch +++ b/roles/install/files/serveradmin.patch @@ -1,6 +1,6 @@ -diff -ruN --strip-trailing-cr ServerAdmin.orig/current_change.html ServerAdmin/current_change.html ---- ServerAdmin.orig/current_change.html 2019-02-02 15:01:14.469571884 +0100 -+++ ServerAdmin/current_change.html 2019-02-02 15:01:32.972537118 +0100 +diff -ruN ServerAdmin.orig/current_change.html ServerAdmin/current_change.html +--- ServerAdmin.orig/current_change.html 2022-12-22 01:43:19.509416046 +0100 ++++ ServerAdmin/current_change.html 2022-12-22 01:43:52.990541726 +0100 @@ -25,13 +25,13 @@ @@ -40,9 +40,9 @@ diff -ruN --strip-trailing-cr ServerAdmin.orig/current_change.html ServerAdmin/c -diff -ruN --strip-trailing-cr ServerAdmin.orig/current_player_row.inc ServerAdmin/current_player_row.inc ---- ServerAdmin.orig/current_player_row.inc 2019-02-02 15:01:14.476571871 +0100 -+++ ServerAdmin/current_player_row.inc 2019-02-02 15:01:32.972537118 +0100 +diff -ruN ServerAdmin.orig/current_player_row.inc ServerAdmin/current_player_row.inc +--- ServerAdmin.orig/current_player_row.inc 2022-12-22 01:43:19.509416046 +0100 ++++ ServerAdmin/current_player_row.inc 2022-12-22 01:43:52.990541726 +0100 @@ -1,7 +1,7 @@ <%player.teamid%>  @@ -52,9 +52,21 @@ diff -ruN --strip-trailing-cr ServerAdmin.orig/current_player_row.inc ServerAdmi <%player.score%> <%player.pawn.health%> <%player.kills%> -diff -ruN --strip-trailing-cr ServerAdmin.orig/current_rules.inc ServerAdmin/current_rules.inc ---- ServerAdmin.orig/current_rules.inc 2019-02-02 15:01:14.475571873 +0100 -+++ ServerAdmin/current_rules.inc 2019-02-02 15:01:32.972537118 +0100 +diff -ruN ServerAdmin.orig/current_players_row.inc ServerAdmin/current_players_row.inc +--- ServerAdmin.orig/current_players_row.inc 2022-12-22 01:43:19.509416046 +0100 ++++ ServerAdmin/current_players_row.inc 2022-12-22 02:12:24.402731660 +0100 +@@ -2,7 +2,7 @@ + <%player.teamid%>  + <%player.name%> + <%player.ping%> +- <%player.ip%> ++ <%player.ip%> + <%player.uniqueid%> + <%player.steamid%> + <%player.steamname%> +diff -ruN ServerAdmin.orig/current_rules.inc ServerAdmin/current_rules.inc +--- ServerAdmin.orig/current_rules.inc 2022-12-22 01:43:19.509416046 +0100 ++++ ServerAdmin/current_rules.inc 2022-12-22 01:43:52.990541726 +0100 @@ -1,3 +1,7 @@ +
Wave
+
<%wave.num%>
@@ -63,9 +75,9 @@ diff -ruN --strip-trailing-cr ServerAdmin.orig/current_rules.inc ServerAdmin/cur
Players
<%rules.numplayers%>/<%rules.maxplayers%>
Minimum to Start
-diff -ruN --strip-trailing-cr ServerAdmin.orig/default_maplist.html ServerAdmin/default_maplist.html ---- ServerAdmin.orig/default_maplist.html 2019-02-02 15:01:14.473571876 +0100 -+++ ServerAdmin/default_maplist.html 2019-02-02 15:06:59.442923705 +0100 +diff -ruN ServerAdmin.orig/default_maplist.html ServerAdmin/default_maplist.html +--- ServerAdmin.orig/default_maplist.html 2022-12-22 01:43:19.509416046 +0100 ++++ ServerAdmin/default_maplist.html 2022-12-22 01:43:52.990541726 +0100 @@ -2,6 +2,8 @@
@@ -120,9 +132,9 @@ diff -ruN --strip-trailing-cr ServerAdmin.orig/default_maplist.html ServerAdmin/ }); //]]> -diff -ruN --strip-trailing-cr ServerAdmin.orig/gamesummary.inc ServerAdmin/gamesummary.inc ---- ServerAdmin.orig/gamesummary.inc 2019-02-02 15:01:14.471571880 +0100 -+++ ServerAdmin/gamesummary.inc 2019-02-02 15:01:32.972537118 +0100 +diff -ruN ServerAdmin.orig/gamesummary.inc ServerAdmin/gamesummary.inc +--- ServerAdmin.orig/gamesummary.inc 2022-12-22 01:43:19.509416046 +0100 ++++ ServerAdmin/gamesummary.inc 2022-12-22 01:43:52.990541726 +0100 @@ -4,6 +4,8 @@
<%map.title.safe%>
Players
@@ -135,9 +147,9 @@ diff -ruN --strip-trailing-cr ServerAdmin.orig/gamesummary.inc ServerAdmin/games +
<%wave.monsters.dead%>/<%wave.monsters.total%>
\ No newline at end of file -diff -ruN --strip-trailing-cr ServerAdmin.orig/policy_bans.html ServerAdmin/policy_bans.html ---- ServerAdmin.orig/policy_bans.html 2019-02-02 15:01:14.486571852 +0100 -+++ ServerAdmin/policy_bans.html 2019-02-02 15:01:32.972537118 +0100 +diff -ruN ServerAdmin.orig/policy_bans.html ServerAdmin/policy_bans.html +--- ServerAdmin.orig/policy_bans.html 2022-12-22 01:43:19.509416046 +0100 ++++ ServerAdmin/policy_bans.html 2022-12-22 01:43:52.990541726 +0100 @@ -2,6 +2,8 @@
@@ -174,9 +186,9 @@ diff -ruN --strip-trailing-cr ServerAdmin.orig/policy_bans.html ServerAdmin/poli
-diff -ruN --strip-trailing-cr ServerAdmin.orig/policy_bans_row.inc ServerAdmin/policy_bans_row.inc ---- ServerAdmin.orig/policy_bans_row.inc 2019-02-02 15:01:14.484571856 +0100 -+++ ServerAdmin/policy_bans_row.inc 2019-02-02 15:01:32.972537118 +0100 +diff -ruN ServerAdmin.orig/policy_bans_row.inc ServerAdmin/policy_bans_row.inc +--- ServerAdmin.orig/policy_bans_row.inc 2022-12-22 01:43:19.509416046 +0100 ++++ ServerAdmin/policy_bans_row.inc 2022-12-22 01:43:52.990541726 +0100 @@ -1,15 +1,15 @@ diff --git a/roles/install/tasks/systemd.yml b/roles/install/tasks/systemd.yml index b27d6be..9cdc49e 100644 --- a/roles/install/tasks/systemd.yml +++ b/roles/install/tasks/systemd.yml @@ -5,16 +5,16 @@ state: latest - name: Install KF2 services - copy: - src: "{{ item }}" - dest: "/etc/systemd/system/{{ item }}" + template: + src: "{{ item }}.service.j2" + dest: "/etc/systemd/system/{{ item }}.service" owner: root group: root mode: '0644' loop: - - kf2.service - - kf2autokick.service - - kf2watchdog.service + - kf2 + - kf2autokick + - kf2watchdog notify: Reload systemd configuration - name: Prepare systemd folder diff --git a/roles/install/files/kf2.service b/roles/install/templates/kf2.service.j2 similarity index 98% rename from roles/install/files/kf2.service rename to roles/install/templates/kf2.service.j2 index 8006618..f44bd93 100644 --- a/roles/install/files/kf2.service +++ b/roles/install/templates/kf2.service.j2 @@ -16,10 +16,12 @@ StandardOutput=file:/home/steam/Steam/logs/kf2.txt # nevermind, the + preffix runs the command with full privileges # prefer truncate, that way klf log keeps working even after a service restart ExecStartPre=+/usr/bin/truncate --size=0 /home/steam/Steam/logs/kf2.txt +{% if not kf2_classic %} # make sure our patches work, wildcards are prohibited so use subshell ExecStartPre=/bin/sh -c '/bin/dos2unix /home/steam/Steam/KF2Server/KFGame/Web/ServerAdmin/*' # apply the patch, ignore if already applied ExecStartPre=-/bin/patch --forward -r /tmp/kf2-patch.rej -p1 -d /home/steam/Steam/KF2Server/KFGame/Web/ServerAdmin -i /etc/systemd/system/kf2.service.d/serveradmin.patch +{% endif %} # make sure KF2 uses the Steam provided library, not the ones it bundles ExecStartPre=/bin/ln -sTf /home/steam/Steam/linux64/steamclient.so /home/steam/Steam/KF2Server/Binaries/Win64/lib64/steamclient.so # these appear to be gone, thankfully diff --git a/roles/install/files/kf2autokick.service b/roles/install/templates/kf2autokick.service.j2 similarity index 100% rename from roles/install/files/kf2autokick.service rename to roles/install/templates/kf2autokick.service.j2 diff --git a/roles/install/files/kf2watchdog.service b/roles/install/templates/kf2watchdog.service.j2 similarity index 100% rename from roles/install/files/kf2watchdog.service rename to roles/install/templates/kf2watchdog.service.j2