Add example usage with Valheim dedicated server
This commit is contained in:
parent
c51b49b193
commit
936d83a89c
4 changed files with 33 additions and 1 deletions
|
@ -1,3 +1,3 @@
|
|||
# valproxy
|
||||
|
||||
UDP proxy for Valheim dedicated server Systemd socket activation
|
||||
UDP proxy for Valheim dedicated server Systemd socket activation.
|
||||
|
|
13
systemd/valheim-proxy.service
Normal file
13
systemd/valheim-proxy.service
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
# BindsTo ensures that the Valheim server will start and be shut down along with the proxy.
|
||||
BindsTo=valheim.service
|
||||
After=valheim.service
|
||||
Requires=valheim-proxy.socket
|
||||
After=valheim-proxy.socket
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/home/valheim/valproxy
|
||||
|
||||
# This is using asdf to manage the version of Node.js
|
||||
ExecStart=/home/valheim/.asdf/shims/node index.js 127.0.0.1 2456
|
5
systemd/valheim-proxy.socket
Normal file
5
systemd/valheim-proxy.socket
Normal file
|
@ -0,0 +1,5 @@
|
|||
[Socket]
|
||||
ListenDatagram=41831
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
14
systemd/valheim.service
Normal file
14
systemd/valheim.service
Normal file
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=Valheim server
|
||||
StopWhenUnneeded=yes
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/home/valheim/valheim
|
||||
Environment=LD_LIBRARY_PATH=./linux64
|
||||
Environment=SteamAppID=892970
|
||||
ExecStart=/home/valheim/valheim/valheim_server.x86_64 -name "server_name" -port 2456 -nographics -batchmode -world "world_name" -password "password" -public 0
|
||||
|
||||
# Important! Always kill with SIGINT so that the server has a chance to save the world.
|
||||
KillSignal=SIGINT
|
||||
WatchdogSignal=SIGINT
|
Loading…
Reference in a new issue