Created
April 10, 2017 13:17
-
-
Save joenas/cb336516c2944954835857887bc31a4c to your computer and use it in GitHub Desktop.
Minetest systemd service for user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Minetest server | |
After=syslog.target network.target | |
[Service] | |
Type=simple | |
Restart=on-failure | |
ExecStart=/usr/bin/minetest --server --world /home/minetest/.minetest/worlds/%i --gameid %i --config server.conf | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This allows for easily running different games/worlds with a quick command
Place
[email protected]
in~/.config/systemd/user
to be able to run without sudo.Usage:
systemctl --user [start|stop|status|restart] minetest@aftermath
for exampleTo keep the session when user logs out:
loginctl enable-linger [username]
Inspired by this, I might add something with
EnvironmentFile
as well to use different ports.