Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
6bd74c851b | |||
bc4493d042 | |||
1f2a50b164 | |||
03b40427af | |||
cf7cbbfc85 | |||
bfe101b063 | |||
21213ff1f1 | |||
f6c8da5609 | |||
8a268ae8ce | |||
0435e68e68 |
1215
SOURCES/kf2-srv
1215
SOURCES/kf2-srv
File diff suppressed because it is too large
Load Diff
3
SOURCES/kf2-srv-beta
Normal file
3
SOURCES/kf2-srv-beta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
/usr/bin/kf2-srv beta $*
|
14
SOURCES/kf2-srv-beta-update.service
Normal file
14
SOURCES/kf2-srv-beta-update.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Check and Update Killing Floor 2 server
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/kf2-srv-beta --update
|
||||||
|
|
||||||
|
PrivateTmp=true
|
||||||
|
PrivateDevices=true
|
||||||
|
ProtectHome=false
|
||||||
|
ProtectSystem=false
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
9
SOURCES/kf2-srv-beta-update.timer
Normal file
9
SOURCES/kf2-srv-beta-update.timer
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Check and Update killing Floor 2 beta job
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=Wed, 04:00
|
||||||
|
Unit=kf2-srv-beta-update.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
21
SOURCES/kf2-srv-beta@.service
Normal file
21
SOURCES/kf2-srv-beta@.service
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Killing Floor 2 Beta Server Daemon - %i
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=steam
|
||||||
|
Group=steam
|
||||||
|
Type=simple
|
||||||
|
StandardOutput=null
|
||||||
|
StandardError=null
|
||||||
|
EnvironmentFile=/etc/kf2-srv/instances-beta/%i/main.conf
|
||||||
|
ExecStart=/usr/games/kf2-srv-beta/Binaries/Win64/KFGameSteamServer.bin.x86_64 ${Map}?Difficulty=${Difficulty}?GameLength=${Length}?Game=${Game}${Args} configsubdir=instances/%i -webadminport=${PortWeb} -queryport=${PortQuery} -port=${PortGame}
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
NoNewPrivileges=yes
|
||||||
|
PrivateTmp=true
|
||||||
|
PrivateDevices=true
|
||||||
|
ProtectHome=true
|
||||||
|
ProtectSystem=false
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
20
SOURCES/kf2-srv.conf
Normal file → Executable file
20
SOURCES/kf2-srv.conf
Normal file → Executable file
@ -1 +1,19 @@
|
|||||||
BranchName="preview"
|
# Displays game difficulty
|
||||||
|
# You can rename them as you like
|
||||||
|
DiffArray=('Normal' 'Hard' 'Suicide' 'Hell')
|
||||||
|
|
||||||
|
# Displays the number of waves
|
||||||
|
# You can rename them as you like
|
||||||
|
WaveArray=('4' '7' '10')
|
||||||
|
|
||||||
|
# Add custom gamemodes to the end of the list, similar to what is already there:
|
||||||
|
ModeArray['KFGameContent.KFGameInfo_Survival']='Survival'
|
||||||
|
ModeArray['KFGameContent.KFGameInfo_WeeklySurvival']='Weekly'
|
||||||
|
ModeArray['KFGameContent.KFGameInfo_Endless']='Endless'
|
||||||
|
ModeArray['KFGameContent.KFGameInfo_Objective']='Objective'
|
||||||
|
ModeArray['KFGameContent.KFGameInfo_VersusSurvival']='Versus'
|
||||||
|
|
||||||
|
# Bot default password
|
||||||
|
# To change the password for the bot, you must do this here and in WebAdmin.
|
||||||
|
# Otherwise, the bot will stop working and some actions cannot be done on running servers
|
||||||
|
ServerBotPassword=VerySecretBotPassword
|
||||||
|
@ -8,7 +8,7 @@ Type=simple
|
|||||||
StandardOutput=null
|
StandardOutput=null
|
||||||
StandardError=null
|
StandardError=null
|
||||||
EnvironmentFile=/etc/kf2-srv/instances/%i/main.conf
|
EnvironmentFile=/etc/kf2-srv/instances/%i/main.conf
|
||||||
ExecStart=/usr/games/kf2-srv/Binaries/Win64/KFGameSteamServer.bin.x86_64 $Map configsubdir=instances/%i $Arg1 $Arg2 $Arg3
|
ExecStart=/usr/games/kf2-srv/Binaries/Win64/KFGameSteamServer.bin.x86_64 ${Map}?Difficulty=${Difficulty}?GameLength=${Length}?Game=${Game}${Args} configsubdir=instances/%i -webadminport=${PortWeb} -queryport=${PortQuery} -port=${PortGame}
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
NoNewPrivileges=yes
|
NoNewPrivileges=yes
|
||||||
|
@ -1,9 +1,36 @@
|
|||||||
LANG=en_US.UTF-8
|
LANG=en_US.UTF-8
|
||||||
|
|
||||||
Map=kf-bioticslab
|
PortWeb=8080
|
||||||
|
PortQuery=27015
|
||||||
|
PortGame=7777
|
||||||
|
|
||||||
Arg1="-webadminport=8080"
|
# Default Map
|
||||||
Arg2="-queryport=27015"
|
Map=KF-Nuked
|
||||||
Arg3="-port=7777"
|
|
||||||
|
|
||||||
Description="Default description"
|
# Difficulty:
|
||||||
|
# Normal: 0
|
||||||
|
# Hard: 1
|
||||||
|
# Suicide: 2
|
||||||
|
# Hell: 3
|
||||||
|
Difficulty=2
|
||||||
|
|
||||||
|
# Game:
|
||||||
|
# Survival: KFGameContent.KFGameInfo_Survival
|
||||||
|
# WeeklyOutbreak: KFGameContent.KFGameInfo_WeeklySurvival
|
||||||
|
# Endless: KFGameContent.KFGameInfo_Endless
|
||||||
|
# Objective: KFGameContent.KFGameInfo_Objective
|
||||||
|
# Versus: KFGameContent.KFGameInfo_VersusSurvival
|
||||||
|
Game=KFGameContent.KFGameInfo_Endless
|
||||||
|
|
||||||
|
# GameLength:
|
||||||
|
# 4 waves: 0
|
||||||
|
# 7 waves: 1
|
||||||
|
# 10 waves: 2
|
||||||
|
Length=2
|
||||||
|
|
||||||
|
# Additional parameters
|
||||||
|
# If the parameter is used, it must necessarily begin with a character '?'
|
||||||
|
Args=
|
||||||
|
|
||||||
|
# Notes for yourself
|
||||||
|
Comment=
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
%global steamuser steam
|
||||||
|
|
||||||
Name: kf2-srv
|
Name: kf2-srv
|
||||||
Version: 0.1.0
|
Version: 0.9.1
|
||||||
Release: 1%{dist}
|
Release: 1%{dist}
|
||||||
Summary: Killing Floor 2 server
|
Summary: Killing Floor 2 server
|
||||||
Group: Amusements/Games
|
Group: Amusements/Games
|
||||||
@ -7,20 +9,35 @@ License: GNU GPLv3
|
|||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
Source1: %{name}
|
Source1: %{name}
|
||||||
Source2: %{name}.conf
|
Source2: %{name}-beta
|
||||||
Source3: %{name}.xml
|
Source3: %{name}.xml
|
||||||
Source4: %{name}@.service
|
Source4: %{name}@.service
|
||||||
Source5: %{name}-update.service
|
Source5: %{name}-update.service
|
||||||
Source6: %{name}-update.timer
|
Source6: %{name}-update.timer
|
||||||
Source7: main.conf.template
|
Source7: main.conf.template
|
||||||
|
Source8: %{name}-beta@.service
|
||||||
|
Source9: %{name}-beta-update.service
|
||||||
|
Source10: %{name}-beta-update.timer
|
||||||
|
Source11: %{name}.conf
|
||||||
|
|
||||||
Requires: systemd >= 219
|
Requires: systemd >= 219
|
||||||
Requires: steamcmd
|
Requires: steamcmd
|
||||||
|
Requires: libxml2
|
||||||
|
Requires: dos2unix
|
||||||
|
Requires: curl
|
||||||
|
Requires: grep
|
||||||
|
Requires: coreutils
|
||||||
|
Requires: sed
|
||||||
|
Requires: util-linux
|
||||||
|
Requires: sudo
|
||||||
|
Requires: psmisc
|
||||||
|
Requires: gawk
|
||||||
|
Requires: multini >= 0.2.3
|
||||||
|
|
||||||
Provides: %{name}
|
Provides: %{name}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Killing Floor 2 server
|
Command line tool for managing a set of Killing Floor 2 servers.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
|
||||||
@ -32,48 +49,103 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
install -m 755 -d %{buildroot}/%{_bindir}
|
install -m 755 -d %{buildroot}/%{_bindir}
|
||||||
install -m 755 -d %{buildroot}/%{_prefix}/lib/systemd/system
|
install -m 755 -d %{buildroot}/%{_prefix}/lib/systemd/system
|
||||||
install -m 755 -d %{buildroot}/%{_prefix}/lib/firewalld/services
|
install -m 755 -d %{buildroot}/%{_prefix}/lib/firewalld/services
|
||||||
install -m 755 -d %{buildroot}/%{_sysconfdir}/%{name}
|
install -m 755 -d %{buildroot}/%{_sysconfdir}/%{name}/instances
|
||||||
|
install -m 755 -d %{buildroot}/%{_sysconfdir}/%{name}/instances-beta
|
||||||
|
install -m 755 -d %{buildroot}/%{_sysconfdir}/%{name}/mapcycles
|
||||||
install -m 644 -d %{buildroot}/%{_prefix}/games/%{name}
|
install -m 644 -d %{buildroot}/%{_prefix}/games/%{name}
|
||||||
|
install -m 644 -d %{buildroot}/%{_prefix}/games/%{name}-beta
|
||||||
|
|
||||||
install -m 755 %{SOURCE1} %{buildroot}/%{_bindir}
|
install -m 755 %{SOURCE1} %{buildroot}/%{_bindir}
|
||||||
install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}
|
install -m 644 %{SOURCE2} %{buildroot}/%{_bindir}
|
||||||
install -m 644 %{SOURCE3} %{buildroot}/%{_prefix}/lib/firewalld/services
|
install -m 644 %{SOURCE3} %{buildroot}/%{_prefix}/lib/firewalld/services
|
||||||
install -m 644 %{SOURCE4} %{buildroot}/%{_prefix}/lib/systemd/system
|
install -m 644 %{SOURCE4} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||||
install -m 644 %{SOURCE5} %{buildroot}/%{_prefix}/lib/systemd/system
|
install -m 644 %{SOURCE5} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||||
install -m 644 %{SOURCE6} %{buildroot}/%{_prefix}/lib/systemd/system
|
install -m 644 %{SOURCE6} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||||
install -m 644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/%{name}
|
install -m 644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/%{name}
|
||||||
|
install -m 644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||||
sed -i -r "s|^(InstallDir=).*$|\1\"%{_prefix}/games/%{name}\"|g" %{buildroot}/%{_bindir}/%{name}
|
install -m 644 %{SOURCE9} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||||
|
install -m 644 %{SOURCE10} %{buildroot}/%{_prefix}/lib/systemd/system
|
||||||
|
install -m 644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/%{name}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%attr(775,root,root) %dir %{_prefix}/games/%{name}
|
%attr(775,root,%{steamuser}) %dir %{_prefix}/games/%{name}
|
||||||
%attr(755,root,root) %dir %{_sysconfdir}/%{name}
|
%attr(775,root,%{steamuser}) %dir %{_prefix}/games/%{name}-beta
|
||||||
%attr(644,root,root) %{_sysconfdir}/%{name}/main.conf.template
|
%attr(775,root,%{steamuser}) %dir %{_sysconfdir}/%{name}
|
||||||
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
%attr(775,root,%{steamuser}) %dir %{_sysconfdir}/%{name}/instances
|
||||||
%attr(644,root,root) %config(noreplace) %{_prefix}/lib/firewalld/services/%{name}.xml
|
%attr(775,root,%{steamuser}) %dir %{_sysconfdir}/%{name}/instances-beta
|
||||||
%attr(755,root,root) %{_bindir}/%{name}
|
%attr(775,root,%{steamuser}) %dir %{_sysconfdir}/%{name}/mapcycles
|
||||||
%attr(644,root,root) %{_prefix}/lib/systemd/system/*
|
%attr(644,root,%{steamuser}) %config(noreplace) %{_sysconfdir}/%{name}/main.conf.template
|
||||||
|
%attr(640,root,%{steamuser}) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
||||||
%post
|
%attr(644,root,root) %config(noreplace) %{_prefix}/lib/firewalld/services/%{name}.xml
|
||||||
#/bin/env bash
|
%attr(755,root,root) %{_bindir}/%{name}
|
||||||
#if [[ $1 -eq 1 ]]; then # First installation
|
%attr(755,root,root) %{_bindir}/%{name}-beta
|
||||||
#
|
%attr(644,root,root) %{_prefix}/lib/systemd/system/*
|
||||||
#fi
|
|
||||||
#exit 0
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
#/bin/env bash
|
|
||||||
if [[ $1 -eq 0 ]] ; then # Uninstall
|
if [[ $1 -eq 0 ]] ; then # Uninstall
|
||||||
%{_bindir}/%{name} --stop
|
%{_bindir}/%{name} --stop
|
||||||
%{_bindir}/%{name} --disable
|
%{_bindir}/%{name} --disable
|
||||||
yes | %{_bindir}/%{name} --delete
|
|
||||||
rm -f %{_sysconfdir}/%{name}/instances
|
|
||||||
rm -rf %{_prefix}/games/%{name}/*
|
rm -rf %{_prefix}/games/%{name}/*
|
||||||
|
rm -rf %{_prefix}/games/%{name}-beta/*
|
||||||
|
rm -rf %{_sysconfdir}/%{name}/instances/default
|
||||||
|
rm -rf %{_sysconfdir}/%{name}/instances-beta/default
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun May 31 2020 GenZmeY <genzmey@gmail.com> - 0.9.1-1
|
||||||
|
- fix realtime -mrl with spaces;
|
||||||
|
- mapcycles directory.
|
||||||
|
|
||||||
|
* Wed May 27 2020 GenZmeY <genzmey@gmail.com> - 0.9.0-1
|
||||||
|
- new main.conf format;
|
||||||
|
- multiple WebAdmin and http auth by default;
|
||||||
|
- online actions;
|
||||||
|
- chat-bot;
|
||||||
|
- set password;
|
||||||
|
- refactoring.
|
||||||
|
|
||||||
|
* Mon Apr 27 2020 GenZmeY <genzmey@gmail.com> - 0.8.0-1
|
||||||
|
- use multini for ini edit;
|
||||||
|
- add mutators support;
|
||||||
|
- refactoring;
|
||||||
|
- returned "reboot-updates".
|
||||||
|
|
||||||
|
* Sat Mar 7 2020 GenZmeY <genzmey@gmail.com> - 0.7.0-1
|
||||||
|
- dual versions support;
|
||||||
|
- check updates;
|
||||||
|
- bugfixes.
|
||||||
|
|
||||||
|
* Sat Jan 18 2020 GenZmeY <genzmey@gmail.com> - 0.6.0-1
|
||||||
|
- versions;
|
||||||
|
- instance conf tweaks;
|
||||||
|
- extended map list;
|
||||||
|
- clear cache on delete map;
|
||||||
|
- removed useless messages.
|
||||||
|
|
||||||
|
* Sun Jan 12 2020 GenZmeY <genzmey@gmail.com> - 0.5.0-1
|
||||||
|
- ban admin;
|
||||||
|
- map admin;
|
||||||
|
- multiple args support.
|
||||||
|
|
||||||
|
* Sun Sep 29 2019 GenZmeY <genzmey@gmail.com> - 0.4.0-1
|
||||||
|
- Reworked main.template and kf2-srv@.service;
|
||||||
|
- Add --restart option;
|
||||||
|
- --status option shows more info;
|
||||||
|
- --list option removed.
|
||||||
|
|
||||||
|
* Fri Sep 20 2019 GenZmeY <genzmey@gmail.com> - 0.3.0-1
|
||||||
|
- validate option;
|
||||||
|
- auto validate on change active branch;
|
||||||
|
- port info on --status.
|
||||||
|
|
||||||
|
* Mon Sep 16 2019 GenZmeY <genzmey@gmail.com> - 0.2.1-1
|
||||||
|
- --map-sync bugfixes.
|
||||||
|
|
||||||
|
* Mon Sep 16 2019 GenZmeY <genzmey@gmail.com> - 0.2.0-1
|
||||||
|
- Add --map-sync implementation to kf2-srv.
|
||||||
|
|
||||||
* Sat Sep 14 2019 GenZmeY <genzmey@gmail.com> - 0.1.0-1
|
* Sat Sep 14 2019 GenZmeY <genzmey@gmail.com> - 0.1.0-1
|
||||||
- First version of spec.
|
- First version of spec.
|
||||||
|
Reference in New Issue
Block a user