Compare commits

...

11 Commits

Author SHA1 Message Date
3d2a1344e0 fix steamclient setting 2021-06-23 00:02:59 +03:00
279cc67949 Merge branch 'master' of https://github.com/GenZmeY/kf2-srv 2021-06-22 23:32:38 +03:00
c3caaeec43 fix typo in version 2021-06-22 23:31:44 +03:00
919b1f7ff5 add FixSteamclientLib setting to config 2021-06-22 23:30:43 +03:00
da14c2fe32 Update README.md 2021-03-15 03:35:41 +03:00
2cbf335169 Update README.md 2021-03-15 03:34:29 +03:00
ffce77fc41 Update README.md 2021-03-15 03:25:27 +03:00
6f26d5cd85 Update README.md 2021-03-15 03:23:52 +03:00
e9a1095316 Update README.md 2021-03-15 03:23:33 +03:00
1290eb1536 upd spec 2021-02-27 03:30:03 +03:00
1e76e92fca bugfixing 2021-02-27 03:25:38 +03:00
5 changed files with 65 additions and 29 deletions

View File

@ -1,24 +1,27 @@
# kf2-srv # KF2-SRV
*Killing Floor 2 server tool for RHEL8/CentOS8* *Killing Floor 2 server tool for RHEL8/CentOS8*
[![build release](https://github.com/GenZmeY/kf2-srv/workflows/build%20release/badge.svg)](https://github.com/GenZmeY/kf2-srv/actions?query=workflow%3A%22build+release%22) [![build release](https://github.com/GenZmeY/KF2-SRV/workflows/build%20release/badge.svg)](https://github.com/GenZmeY/KF2-SRV/actions?query=workflow%3A%22build+release%22)
[![tests (master)](https://github.com/GenZmeY/kf2-srv/workflows/tests%20(master)/badge.svg?branch=master)](https://github.com/GenZmeY/kf2-srv/actions?query=workflow%3A%22tests+%28master%29%22) [![tests (master)](https://github.com/GenZmeY/KF2-SRV/workflows/tests%20(master)/badge.svg?branch=master)](https://github.com/GenZmeY/KF2-SRV/actions?query=workflow%3A%22tests+%28master%29%22)
[![tests (dev)](https://github.com/GenZmeY/kf2-srv/workflows/tests%20(dev)/badge.svg?branch=dev)](https://github.com/GenZmeY/kf2-srv/actions?query=workflow%3A%22tests+%28dev%29%22) [![tests (dev)](https://github.com/GenZmeY/KF2-SRV/workflows/tests%20(dev)/badge.svg?branch=dev)](https://github.com/GenZmeY/KF2-SRV/actions?query=workflow%3A%22tests+%28dev%29%22)
[![GitHub release](https://img.shields.io/github/v/release/genzmey/kf2-srv)](https://github.com/genzmey/kf2-srv/releases/latest) [![GitHub release](https://img.shields.io/github/v/release/genzmey/KF2-SRV)](https://github.com/genzmey/KF2-SRV/releases/latest)
[![GitHub Release Date](https://img.shields.io/github/release-date/genzmey/kf2-srv)](https://github.com/genzmey/kf2-srv/releases/latest) [![GitHub Release Date](https://img.shields.io/github/release-date/genzmey/KF2-SRV)](https://github.com/genzmey/KF2-SRV/releases/latest)
![GitHub](https://img.shields.io/github/license/genzmey/KF2-SRV)
# Features # Readme under construction
... `¯\_(ツ)_/¯`
# Build But you can find actual rpm packages here: https://github.com/GenZmeY/KF2-SRV/releases
... And basic usage information here: https://github.com/GenZmeY/KF2-SRV/blob/master/SOURCES/README
**Filesystem:**
configs: `/etc/kf2-srv/`
game server: `/usr/games/kf2-srv`
game server (beta): `/usr/games/kf2-srv-beta`
cache: `/var/cache/kf2-srv`
logs: `/var/log/kf2-srv`
logs (beta): `/var/logs/kf2-srv`
# Install You also need multini and steamcmd dependencies which can be found in my repo: https://repo.ayano.su/el8/x86_64/
...
# Usage
...
# License # License
![GitHub](https://img.shields.io/github/license/genzmey/kf2-srv) [GNU GPLv3](LICENSE)
...

View File

@ -29,3 +29,6 @@ MutNames['ZedCustom.ZedCustomMut']='ZedVarients'
IniPermissions=664 IniPermissions=664
IniGroup=steam IniGroup=steam
# if true all steamclient.so will be replaced by symlinks to:
# /usr/games/steamcmd/linux64/steamclient.so
FixSteamclientLib=True

View File

@ -96,9 +96,10 @@ function game_validate ()
local BetaArg="-beta preview" local BetaArg="-beta preview"
fi fi
instance_stop instance_stop
remove_symlink_steamclient_so
steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg validate +exit steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg validate +exit
apply_patch apply_patch
fix_steamclient_so create_symlink_steamclient_so
instance_start instance_start
} }
@ -107,6 +108,8 @@ function first_install ()
include /etc/steamcmd/steamcmd.conf include /etc/steamcmd/steamcmd.conf
include /etc/kf2-srv/bot.conf include /etc/kf2-srv/bot.conf
remove_symlink_steamclient_so
if ! steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg validate +exit; then if ! steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg validate +exit; then
echo "Errors during installation - exit" echo "Errors during installation - exit"
exit 1 exit 1
@ -199,7 +202,7 @@ function first_install ()
killall -KILL KFGameSteamServer.bin.x86_64; sleep 1 killall -KILL KFGameSteamServer.bin.x86_64; sleep 1
create_cache create_cache
fix_steamclient_so create_symlink_steamclient_so
ln -s "$InstanceConfigDir" "$DefaultConfigDir/instances" ln -s "$InstanceConfigDir" "$DefaultConfigDir/instances"
make_default_instance make_default_instance
apply_patch apply_patch
@ -241,14 +244,30 @@ function create_cache ()
fi fi
} }
function fix_steamclient_so () function remove_symlink_steamclient_so ()
{ {
rm -f "$InstallDir/linux64/steamclient.so" include /etc/kf2-srv/kf2-srv.conf
rm -f "$InstallDir/steamclient.so"
rm -f "$InstallDir/Binaries/Win64/lib64/steamclient.so" if echo "$FixSteamclientLib" | grep -qiF 'true'; then
ln -s "/usr/games/steamcmd/linux64/steamclient.so" "$InstallDir/linux64/steamclient.so" rm -f "$InstallDir/linux64/steamclient.so"
ln -s "/usr/games/steamcmd/linux64/steamclient.so" "$InstallDir/steamclient.so" rm -f "$InstallDir/steamclient.so"
ln -s "/usr/games/steamcmd/linux64/steamclient.so" "$InstallDir/Binaries/Win64/lib64/steamclient.so" rm -f "$InstallDir/Binaries/Win64/lib64/steamclient.so"
else
test -L "$InstallDir/linux64/steamclient.so" && rm -f "$InstallDir/linux64/steamclient.so"
test -L "$InstallDir/steamclient.so" && rm -f "$InstallDir/steamclient.so"
test -L "$InstallDir/Binaries/Win64/lib64/steamclient.so" && rm -f "$InstallDir/Binaries/Win64/lib64/steamclient.so"
fi
}
function create_symlink_steamclient_so ()
{
include /etc/kf2-srv/kf2-srv.conf
if echo "$FixSteamclientLib" | grep -qiF 'true'; then
ln -s "/usr/games/steamcmd/linux64/steamclient.so" "$InstallDir/linux64/steamclient.so"
ln -s "/usr/games/steamcmd/linux64/steamclient.so" "$InstallDir/steamclient.so"
ln -s "/usr/games/steamcmd/linux64/steamclient.so" "$InstallDir/Binaries/Win64/lib64/steamclient.so"
fi
} }
function make_default_instance () # $1: Dir function make_default_instance () # $1: Dir
@ -282,6 +301,8 @@ function apply_patch ()
{ {
if [[ -x "$PatchDir/kf2-ranked-patch" ]]; then if [[ -x "$PatchDir/kf2-ranked-patch" ]]; then
"$PatchDir/kf2-ranked-patch" "$AppBin" "$AppBinOrig" "$PatchDir/kf2-ranked-patch" "$AppBin" "$AppBinOrig"
chmod +x "$AppBin" "$AppBinOrig"
chown "$SteamUser:$SteamUser" "$AppBin" "$AppBinOrig"
fi fi
} }

View File

@ -45,7 +45,7 @@ function service_name () # $*: Instance[s]
local Services="" local Services=""
for Instance in $* for Instance in $*
do do
if multini -g "$InstanceConfigDir/$Instance" '' "UseOrigApp" 2> /dev/null | grep -Piqo '^True$' && test -x "$AppBinOrig"; then if multini -g "$InstanceConfigDir/$Instance/instance.conf" '' "UseOrigApp" 2> /dev/null | grep -Piqo '^True$' && test -x "$AppBinOrig"; then
Services+=" kf2-srv${KF2POSTFIX}-orig@$Instance.service" Services+=" kf2-srv${KF2POSTFIX}-orig@$Instance.service"
else else
Services+=" kf2-srv${KF2POSTFIX}@$Instance.service" Services+=" kf2-srv${KF2POSTFIX}@$Instance.service"

View File

@ -1,7 +1,7 @@
%global steamuser steam %global steamuser steam
Name: kf2-srv Name: kf2-srv
Version: 0.17.0 Version: 0.18.1
Release: 1%{dist} Release: 1%{dist}
Summary: Killing Floor 2 server Summary: Killing Floor 2 server
Group: Amusements/Games Group: Amusements/Games
@ -101,8 +101,17 @@ if [[ $1 == 1 ]]; then # Install
fi fi
%changelog %changelog
* Tue Jun 22 2021 GenZmeY <genzmey@gmail.com> - 0.18.1-1
- fix "FixSteamclientLib" setting.
* Tue Jun 22 2021 GenZmeY <genzmey@gmail.com> - 0.18.0-1
- add FixSteamclientLib setting to config.
* Sat Feb 27 2021 GenZmeY <genzmey@gmail.com> - 0.17.1-1
- fix the start of the original app.
* Sun Feb 21 2021 GenZmeY <genzmey@gmail.com> - 0.17.0-1 * Sun Feb 21 2021 GenZmeY <genzmey@gmail.com> - 0.17.0-1
- Binary patching support. - binary patching support.
* Mon Sep 21 2020 GenZmeY <genzmey@gmail.com> - 0.16.0-1 * Mon Sep 21 2020 GenZmeY <genzmey@gmail.com> - 0.16.0-1
- remove force-attr daemon; - remove force-attr daemon;