06-02-2020, 01:46 AM
(This post was last modified: 07-07-2020, 06:49 PM by TimelesslyPrecise.)
Thread Starter / note for later reference,
I noticed at the time of writing, CentOS 8 does not have Xonotic in the EPEL repo yet...
Fedora 32 has it.
packaged versions are missing a FirewallD and SystemD 'service' files.
maybe this can make it's way to mainstream packaging/release..
the following should be sufficient (and would be handy if included in the 'xonotic-dedicated' package in the repo):
FirewallD Service (where):
Contents:
Load it up (persistent after reboots & run it now):
-------------
-------------
SystemD Service (where):
Contents:
Might need to reload systemD and also might need to fix SElinux context for systemd to work with the service (running this as root):
Load it up (persistent after reboots & run it now):
Check the status:
Manage:
Turn it off(persistent after reboots):
With this way, you can load custom maps in ~/.xonotic/data/maps for custom maps to be loaded, and have ~/.xonotic/data/server.cfg in the default locations for the dedicatedxonoticuser you create.
tune to your liking. good starting point to get this pushed into the repos.
Thanks
I noticed at the time of writing, CentOS 8 does not have Xonotic in the EPEL repo yet...
Fedora 32 has it.
packaged versions are missing a FirewallD and SystemD 'service' files.
maybe this can make it's way to mainstream packaging/release..
the following should be sufficient (and would be handy if included in the 'xonotic-dedicated' package in the repo):
FirewallD Service (where):
Code:
/usr/lib/firewalld/services/xonotic-server.xml
Contents:
Code:
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Xonotic Server</short>
<description>Xonotic AFPS Game Server for users on your server to play.</description>
<port protocol="udp" port="26000"/>
</service>
Load it up (persistent after reboots & run it now):
Code:
sudo firewall-cmd --add-service=xonotic-server --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-all
-------------
-------------
SystemD Service (where):
Code:
/usr/lib/systemd/system/xonotic-server.service
Contents:
Code:
####Xonotic Server SystemD service configuration file
[Unit]
Description=Xonotic FPS Game Server
After=network.target
[Service]
Type=simple
ExecStart=xonotic-dedicated -game data/maps -game data
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
##Direct Logs to null if you specify a logfile elsewhere in the config
StandardOutput=null
StandardError=null
SyslogIdentifier=xonotic-server-log
User=dedicatedxonoticuseraccount
Group=dedicatedxonoticusergroup
WorkingDirectory=/usr/share/xonotic/
[Install]
WantedBy=multi-user.target
#Alias=
Might need to reload systemD and also might need to fix SElinux context for systemd to work with the service (running this as root):
Code:
restorecon -R -v /usr/lib/systemd/system/
systemctl daemon-reload
Load it up (persistent after reboots & run it now):
Code:
sudo systemctl enable --now xonotic-server.service
Check the status:
Code:
sudo systemctl status xonotic-server
Manage:
Code:
sudo systemctl start xonotic-server
sudo systemctl stop xonotic-server
sudo systemctl restart xonotic-server
Turn it off(persistent after reboots):
Code:
sudo systemctl disable xonotic-server.service
With this way, you can load custom maps in ~/.xonotic/data/maps for custom maps to be loaded, and have ~/.xonotic/data/server.cfg in the default locations for the dedicatedxonoticuser you create.
tune to your liking. good starting point to get this pushed into the repos.
Thanks