binary patching support
This commit is contained in:
@ -25,6 +25,7 @@ readonly ScriptVersion=$(rpm -q --queryformat '%{VERSION}' "$ScriptName")
|
||||
|
||||
readonly GrpDir=":DEFINE_PREFIX:/share/kf2-srv/cmdgrp"
|
||||
readonly LibDir=":DEFINE_PREFIX:/share/kf2-srv/lib"
|
||||
readonly PatchDir=":DEFINE_PREFIX:/share/kf2-srv/patch"
|
||||
|
||||
readonly InstallDir=":DEFINE_PREFIX:/games/kf2-srv${KF2POSTFIX}"
|
||||
readonly AppBin="$InstallDir/Binaries/Win64/KFGameSteamServer.bin.x86_64"
|
||||
|
@ -60,6 +60,7 @@ function game_update ()
|
||||
elif updates_aviable; then
|
||||
instance_stop
|
||||
steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg +exit
|
||||
apply_patch
|
||||
instance_start
|
||||
else
|
||||
echo "Server is up to date"
|
||||
@ -96,6 +97,7 @@ function game_validate ()
|
||||
fi
|
||||
instance_stop
|
||||
steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg validate +exit
|
||||
apply_patch
|
||||
fix_steamclient_so
|
||||
instance_start
|
||||
}
|
||||
@ -200,6 +202,7 @@ function first_install ()
|
||||
fix_steamclient_so
|
||||
ln -s "$InstanceConfigDir" "$DefaultConfigDir/instances"
|
||||
make_default_instance
|
||||
apply_patch
|
||||
echo "KF2 succesfully installed"
|
||||
}
|
||||
|
||||
@ -275,6 +278,13 @@ function make_default_instance () # $1: Dir
|
||||
fix_ini_eol "$InstanceDir"
|
||||
}
|
||||
|
||||
function apply_patch ()
|
||||
{
|
||||
if [[ -x "$PatchDir/kf2-ranked-patch" ]]; then
|
||||
"$PatchDir/kf2-ranked-patch" "$AppBin"
|
||||
fi
|
||||
}
|
||||
|
||||
function fix_ini_eol () # $1: Dir
|
||||
{
|
||||
find "$1" \( -type l -o -type f \) -name '*.ini' | \
|
||||
|
@ -1,6 +1,5 @@
|
||||
[Unit]
|
||||
Description=Killing Floor 2 Beta Server Daemon - %i
|
||||
After=kf2-srv-force-attr.service
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
@ -13,7 +12,7 @@ StandardError=syslog
|
||||
SyslogIdentifier=kf2-srv-beta/%i
|
||||
EnvironmentFile=/etc/kf2-srv/instances-beta/%i/instance.conf
|
||||
ExecStart=:DEFINE_PREFIX:/games/kf2-srv-beta/Binaries/Win64/KFGameSteamServer.bin.x86_64 ${Map}?Difficulty=${Difficulty}?GameLength=${Length}?Game=${Game}?Mutator=${Mutators}?${Args} configsubdir=instances/%i -webadminport=${PortWeb} -queryport=${PortQuery} -port=${PortGame}
|
||||
Restart=always
|
||||
Restart=on-failure
|
||||
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=true
|
||||
|
@ -1,6 +1,5 @@
|
||||
[Unit]
|
||||
Description=Killing Floor 2 Server Daemon - %i
|
||||
After=kf2-srv-force-attr.service
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
@ -13,7 +12,7 @@ StandardError=syslog
|
||||
SyslogIdentifier=kf2-srv/%i
|
||||
EnvironmentFile=/etc/kf2-srv/instances/%i/instance.conf
|
||||
ExecStart=:DEFINE_PREFIX:/games/kf2-srv/Binaries/Win64/KFGameSteamServer.bin.x86_64 ${Map}?Difficulty=${Difficulty}?GameLength=${Length}?Game=${Game}?Mutator=${Mutators}?${Args} configsubdir=instances/%i -webadminport=${PortWeb} -queryport=${PortQuery} -port=${PortGame}
|
||||
Restart=always
|
||||
Restart=on-failure
|
||||
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=true
|
||||
|
Reference in New Issue
Block a user