Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #104 from ksrgtech/feature/track-service-file
Browse files Browse the repository at this point in the history
  • Loading branch information
KisaragiEffective authored May 15, 2022
2 parents 73a9312 + d5ab05a commit 39f5794
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions servers/v1/data/server/mc.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=Minecraft Server
After=network-online.target

[Service]
User=mcserver
Group=mcserver
TimeoutStopSec=120
WorkingDirectory=/home/mcserver/mc
# shellscript must be executed on the screen(1)
ExecStart=/usr/bin/screen -Dm -S mc /home/mcserver/mc/start.sh

ExecStop=/usr/bin/screen -S mc -X stuff "save-all\015"
ExecStop=/usr/bin/screen -S mc -X stuff "stop\015"
Restart=always

[Install]
WantedBy=multi-user.target

0 comments on commit 39f5794

Please sign in to comment.