ansible/roles/sourcegame/templates/sourcegame.service

30 lines
775 B
Desktop File

#
# 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