Created
June 23, 2018 21:51
-
-
Save DasFranck/8ac7e55d76e8d060ae3734065c84c04d to your computer and use it in GitHub Desktop.
Minecraft server's systemd files
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=Minecraft Server | |
[Service] | |
WorkingDirectory=/home/minecraft/server/ | |
User=minecraft | |
Type=forking | |
ExecStart=/usr/bin/tmux new-session -s mcserver -d './run.sh' | |
ExecStop=/usr/bin/tmux send-keys -t mcserver:0.0 'say SERVER SHUTTING DOWN. Saving map...' C-m 'save-all' C-m 'stop' C-m | |
ExecStop=/bin/sleep 3 | |
[Install] | |
WantedBy=multi-user.target |
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
java -Xmx7G -jar forge*.jar nogui |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
minecraft.service -> /etc/systemd/system/minecraft.service
run.sh -> /home/minecraft/server/run.sh