ansible/roles/sourcegame/templates/sourcegame.service

30 lines
775 B
SYSTEMD
Raw Normal View History

2020-07-05 11:45:27 -05:00
#
# Licensed under the terms of the MIT license
# vim:ft=dosini:
#
[Unit]
Description={{ source_game }} - {{ source_instancename }}
After=network.target
[Service]
User=steamcmd
Group=steamcmd
WorkingDirectory=/var/steam/.steam/SteamApps/common/{{ source_path }}
PrivateUsers=true
ProtectSystem=full
ProtectHome=true
# Implies MountFlags=slave
ProtectKernelTunables=true
# Implies NoNewPrivileges=yes
ProtectKernelModules=true
# Implies MountAPIVFS=yes
ProtectControlGroups=true
ExecStart=/bin/sh -c '/usr/bin/screen -DmS {{ source_instancename }} /var/steam/.steam/SteamApps/common/{{ source_path }}/srcds_run -game {{ source_game }} -maxplayers {{ source_maxplayers }} -authkey {{ steam_api_key }} {{ source_args }}'
Restart=always
[Install]
WantedBy=multi-user.target