Add basic systemd service

This commit is contained in:
Alibek Omarov 2020-12-09 20:47:28 +03:00
parent 033bb35e0f
commit c6e95fd7f2
2 changed files with 18 additions and 0 deletions

2
etc/default/pymaster Normal file
View File

@ -0,0 +1,2 @@
PYMASTER_IP=0.0.0.0
PYMASTER_PORT=27010

View File

@ -0,0 +1,16 @@
[Unit]
Description=Xash3D Master Server
After=network.target
[Service]
Type=simple
EnvironmentFile=-/etc/default/pymaster
User=master
Group=master
WorkingDirectory=/home/master/pymaster/
ExecStart=/home/master/pymaster/pymaster.py -i $PYMASTER_IP -p $PYMASTER_PORT
Restart=on-failure
[Install]
WantedBy=multi-user.target