evennia/bin/unix/evennia.service
2021-04-06 21:04:15 +02:00

39 lines
964 B
Desktop File

# Evennia systemd unit script
#
# Copy this to /usr/lib/systemd/system/ and Edit the paths to match your game.
#
# Then, register with systemd using:
#
# sudo systemctl daemon-reload
# sudo systemctl enable evennia.service
#
[Unit]
Description=Evennia Server
[Service]
Type=simple
#
# Change this to the user the game should run as.
# Don't run this as root. Please, I beg you.
#
User=your-user
#
# The command to start Evennia as a Systemd service. NOTE: These must be absolute paths.
# Replace /your/path/to with whatever is appropriate.
#
ExecStart=/your/path/to/pyenv/bin/python /your/path/to/evennia/bin/unix/evennia ipstart --gamedir /your/path/to/mygame
#
# Service needs to know the path to twistd binary
# Replace /your/path/to/venv/bin with whatever is appropriate
Environment="PATH=/your/path/to/pyenv/bin:$PATH"
# restart on all failures, wait 3 seconds before doing so.
Restart=on-failure
RestartSec=3
[Install]
WantedBy=default.target