commit 5a027ad146e05d176a8040150d2ae5032e516ceb Author: Marco Cawthorne Date: Sat Nov 18 09:53:08 2023 -0800 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..5e16ae0 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# FreeHL Server Configs + +Here's our systemd service files as well as the configs +we run on our FreeHL test servers. + +Clone this directory into the root of your dedicated +server setup. + +## In case you need the dedicated server... +You can bootstrap a dedicated server with this gist: + +https://code.idtech.space/eukara/gist/raw/branch/main/freehlded-bootstrap.sh + + +## When you have the dedicated server files... + +...and you cloned this repo into its own directory inside of it, e.g. `configs/`, +simply run `./copy-cfgs.sh` and it will copy the `server.cfg` files. + +You can also run `./install-services.sh` to install the systemd service files. + +From then on you can enable them all like this: + +sudo systemctl enable freehl-cstrike +sudo systemctl enable freehl-dmc +sudo systemctl enable freehl-gearbox +sudo systemctl enable freehl-hunger +sudo systemctl enable freehl-rewolf +sudo systemctl enable freehl-scihunt +sudo systemctl enable freehl-tfc +sudo systemctl enable freehl-valve + +etc. + + diff --git a/copy-cfgs.sh b/copy-cfgs.sh new file mode 100755 index 0000000..15b5f2b --- /dev/null +++ b/copy-cfgs.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +find ./ -type f -name 'server.cfg' -print | while read LINE +do + DIR=$(dirname "$LINE") + cp -va "$LINE" "../$DIR/server.cfg" +done + +find ./ -type f -name 'mapcycle.txt' -print | while read LINE +do + DIR=$(dirname "$LINE") + cp -va "$LINE" "../$DIR/mapcycle.txt" +done \ No newline at end of file diff --git a/cstrike/server.cfg b/cstrike/server.cfg new file mode 100644 index 0000000..b491dea --- /dev/null +++ b/cstrike/server.cfg @@ -0,0 +1,8 @@ +hostname "FreeCS Test Server" +set sv_public 2 +set deathmatch 1 +set coop 0 +set maxplayers 16 +set mp_timelimit 20 +set pausable 0 +map de_dust2 \ No newline at end of file diff --git a/dmc/server.cfg b/dmc/server.cfg new file mode 100644 index 0000000..c3ad9a7 --- /dev/null +++ b/dmc/server.cfg @@ -0,0 +1,9 @@ +hostname "FreeDMC Test Server" +set sv_public 2 +set deathmatch 1 +set coop 0 +set maxplayers 16 +set mp_timelimit 10 +set mp_fraglimit 30 +set pausable 0 +map dcdm5 \ No newline at end of file diff --git a/freehl-cstrike.service b/freehl-cstrike.service new file mode 100644 index 0000000..393671b --- /dev/null +++ b/freehl-cstrike.service @@ -0,0 +1,22 @@ +[Unit] +Description=FreeHL-CStrike + +[Service] +ExecReload=/bin/kill $MAINPID +KillMode=process +Restart=on-failure + +; You want to adjust these for your user, this example assumes debian +User=debian +Environment="HOME=/home/debian" +WorkingDirectory=/home/debian/halflife/ +ExecStart=/home/debian/halflife/fteqw-sv64 -halflife -game cstrike + +PrivateTmp=true +ProtectHome=false +ProtectSystem=full +PrivateDevices=false +CapabilityBoundingSet=~CAP_SYS_ADMIN + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/freehl-dmc.service b/freehl-dmc.service new file mode 100644 index 0000000..8a75003 --- /dev/null +++ b/freehl-dmc.service @@ -0,0 +1,22 @@ +[Unit] +Description=FreeHL-DMC + +[Service] +ExecReload=/bin/kill $MAINPID +KillMode=process +Restart=on-failure + +; You want to adjust these for your user, this example assumes debian +User=debian +Environment="HOME=/home/debian" +WorkingDirectory=/home/debian/halflife/ +ExecStart=/home/debian/halflife/fteqw-sv64 -halflife -game dmc + +PrivateTmp=true +ProtectHome=false +ProtectSystem=full +PrivateDevices=false +CapabilityBoundingSet=~CAP_SYS_ADMIN + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/freehl-gearbox.service b/freehl-gearbox.service new file mode 100644 index 0000000..7acd1f7 --- /dev/null +++ b/freehl-gearbox.service @@ -0,0 +1,22 @@ +[Unit] +Description=FreeHL-Gearbox + +[Service] +ExecReload=/bin/kill $MAINPID +KillMode=process +Restart=on-failure + +; You want to adjust these for your user, this example assumes debian +User=debian +Environment="HOME=/home/debian" +WorkingDirectory=/home/debian/halflife/ +ExecStart=/home/debian/halflife/fteqw-sv64 -halflife -game gearbox + +PrivateTmp=true +ProtectHome=false +ProtectSystem=full +PrivateDevices=false +CapabilityBoundingSet=~CAP_SYS_ADMIN + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/freehl-hunger.service b/freehl-hunger.service new file mode 100644 index 0000000..865edfe --- /dev/null +++ b/freehl-hunger.service @@ -0,0 +1,22 @@ +[Unit] +Description=FreeHL-Hunger + +[Service] +ExecReload=/bin/kill $MAINPID +KillMode=process +Restart=on-failure + +; You want to adjust these for your user, this example assumes debian +User=debian +Environment="HOME=/home/debian" +WorkingDirectory=/home/debian/halflife/ +ExecStart=/home/debian/halflife/fteqw-sv64 -halflife -game hunger + +PrivateTmp=true +ProtectHome=false +ProtectSystem=full +PrivateDevices=false +CapabilityBoundingSet=~CAP_SYS_ADMIN + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/freehl-rewolf.service b/freehl-rewolf.service new file mode 100644 index 0000000..3b820f0 --- /dev/null +++ b/freehl-rewolf.service @@ -0,0 +1,22 @@ +[Unit] +Description=FreeHL-Rewolf + +[Service] +ExecReload=/bin/kill $MAINPID +KillMode=process +Restart=on-failure + +; You want to adjust these for your user, this example assumes debian +User=debian +Environment="HOME=/home/debian" +WorkingDirectory=/home/debian/halflife/ +ExecStart=/home/debian/halflife/fteqw-sv64 -halflife -game rewolf + +PrivateTmp=true +ProtectHome=false +ProtectSystem=full +PrivateDevices=false +CapabilityBoundingSet=~CAP_SYS_ADMIN + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/freehl-scihunt.service b/freehl-scihunt.service new file mode 100644 index 0000000..150adcb --- /dev/null +++ b/freehl-scihunt.service @@ -0,0 +1,22 @@ +[Unit] +Description=FreeHL-Scihunt + +[Service] +ExecReload=/bin/kill $MAINPID +KillMode=process +Restart=on-failure + +; You want to adjust these for your user, this example assumes debian +User=debian +Environment="HOME=/home/debian" +WorkingDirectory=/home/debian/halflife/ +ExecStart=/home/debian/halflife/fteqw-sv64 -halflife -game scihunt + +PrivateTmp=true +ProtectHome=false +ProtectSystem=full +PrivateDevices=false +CapabilityBoundingSet=~CAP_SYS_ADMIN + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/freehl-tfc.service b/freehl-tfc.service new file mode 100644 index 0000000..4abb055 --- /dev/null +++ b/freehl-tfc.service @@ -0,0 +1,22 @@ +[Unit] +Description=FreeHL-TFC + +[Service] +ExecReload=/bin/kill $MAINPID +KillMode=process +Restart=on-failure + +; You want to adjust these for your user, this example assumes debian +User=debian +Environment="HOME=/home/debian" +WorkingDirectory=/home/debian/halflife/ +ExecStart=/home/debian/halflife/fteqw-sv64 -halflife -game tfc + +PrivateTmp=true +ProtectHome=false +ProtectSystem=full +PrivateDevices=false +CapabilityBoundingSet=~CAP_SYS_ADMIN + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/freehl-valve.service b/freehl-valve.service new file mode 100644 index 0000000..029f0d1 --- /dev/null +++ b/freehl-valve.service @@ -0,0 +1,22 @@ +[Unit] +Description=FreeHL-Valve + +[Service] +ExecReload=/bin/kill $MAINPID +KillMode=process +Restart=on-failure + +; You want to adjust these for your user, this example assumes debian +User=debian +Environment="HOME=/home/debian" +WorkingDirectory=/home/debian/halflife/ +ExecStart=/home/debian/halflife/fteqw-sv64 -halflife + +PrivateTmp=true +ProtectHome=false +ProtectSystem=full +PrivateDevices=false +CapabilityBoundingSet=~CAP_SYS_ADMIN + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/gearbox/server.cfg b/gearbox/server.cfg new file mode 100644 index 0000000..940d549 --- /dev/null +++ b/gearbox/server.cfg @@ -0,0 +1,9 @@ +hostname "FreeOP4 Test Server" +set sv_public 2 +set deathmatch 1 +set coop 0 +set maxplayers 16 +set mp_timelimit 10 +set mp_fraglimit 30 +set pausable 0 +map op4_datacore \ No newline at end of file diff --git a/hunger/mapcycle.txt b/hunger/mapcycle.txt new file mode 100644 index 0000000..9caee42 --- /dev/null +++ b/hunger/mapcycle.txt @@ -0,0 +1,5 @@ +thdm1 +thdm2 +thdm3 +thdm4 +thdm5 \ No newline at end of file diff --git a/hunger/server.cfg b/hunger/server.cfg new file mode 100644 index 0000000..a547a92 --- /dev/null +++ b/hunger/server.cfg @@ -0,0 +1,9 @@ +hostname "StillHungry Test Server" +set sv_public 2 +set deathmatch 1 +set coop 0 +set maxplayers 16 +set mp_timelimit 10 +set mp_fraglimit 30 +set pausable 0 +map thdm1 \ No newline at end of file diff --git a/install-services.sh b/install-services.sh new file mode 100755 index 0000000..0b90514 --- /dev/null +++ b/install-services.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +SERVICE_DIR="/etc/systemd/system" + +find ./ -type f -name '*.service' -print | while read LINE +do + FILE=$(basename "$LINE") + cp -v "$FILE" "$SERVICE_DIR/$FILE" +done \ No newline at end of file diff --git a/rewolf/server.cfg b/rewolf/server.cfg new file mode 100644 index 0000000..4171e15 --- /dev/null +++ b/rewolf/server.cfg @@ -0,0 +1,9 @@ +hostname "FreeGunman Test Server" +set sv_public 2 +set deathmatch 1 +set coop 0 +set maxplayers 16 +set mp_timelimit 10 +set mp_fraglimit 30 +set pausable 0 +map highnoon \ No newline at end of file diff --git a/scihunt/server.cfg b/scihunt/server.cfg new file mode 100644 index 0000000..da26d2c --- /dev/null +++ b/scihunt/server.cfg @@ -0,0 +1,10 @@ +hostname "FreeSci Test Server" +set sv_public 2 +set deathmatch 1 +set coop 0 +set maxplayers 16 +set mp_timelimit 10 +set mp_fraglimit 30 +set pausable 0 +set sh_scimax 50 +map 5amsci \ No newline at end of file diff --git a/tfc/server.cfg b/tfc/server.cfg new file mode 100644 index 0000000..6d8d6ee --- /dev/null +++ b/tfc/server.cfg @@ -0,0 +1,8 @@ +hostname "FreeTFC Test Server" +set sv_public 2 +set deathmatch 1 +set coop 0 +set maxplayers 16 +set mp_timelimit 30 +set pausable 0 +map 2fort \ No newline at end of file diff --git a/valve/server.cfg b/valve/server.cfg new file mode 100644 index 0000000..5e4bf78 --- /dev/null +++ b/valve/server.cfg @@ -0,0 +1,9 @@ +hostname "FreeHL Test Server" +set sv_public 2 +set deathmatch 1 +set coop 0 +set maxplayers 16 +set mp_timelimit 10 +set mp_fraglimit 30 +set pausable 0 +map crossfire \ No newline at end of file