diff --git a/etc/default/pymaster b/etc/default/pymaster new file mode 100644 index 0000000..7e64044 --- /dev/null +++ b/etc/default/pymaster @@ -0,0 +1,2 @@ +PYMASTER_IP=0.0.0.0 +PYMASTER_PORT=27010 diff --git a/etc/systemd/system/pymaster.service b/etc/systemd/system/pymaster.service new file mode 100644 index 0000000..fb4030f --- /dev/null +++ b/etc/systemd/system/pymaster.service @@ -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 +