summarylogtreecommitdiffstats
path: root/minecraftd.service
diff options
context:
space:
mode:
authorPhilip Abernethy2015-07-03 19:16:00 +0200
committerPhilip Abernethy2015-07-03 19:16:00 +0200
commit2c972cc0990cbd02218c6ad916b503b8c707f72a (patch)
treedc4350977bca49990125d2ee7db8a9e4d1392e43 /minecraftd.service
downloadaur-2c972cc0990cbd02218c6ad916b503b8c707f72a.tar.gz
Initial commit
Diffstat (limited to 'minecraftd.service')
-rw-r--r--minecraftd.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/minecraftd.service b/minecraftd.service
new file mode 100644
index 000000000000..d649d633d619
--- /dev/null
+++ b/minecraftd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Minecraft server daemon
+After=network.target
+
+[Service]
+User=minecraft
+Group=minecraft
+ExecStart=/usr/bin/minecraftd
+Type=oneshot
+RemainAfterExit=yes
+ExecStop=/usr/bin/screen -S minecraft -X stuff 'say Server Shutting Down in 5 Seconds\n' ; /usr/bin/sleep 5 ; /usr/bin/screen -S minecraft -X stuff 'stop\n' ; /usr/bin/expect -c "exec screen -x minecraft ; wait ; exit"
+
+[Install]
+WantedBy=multi-user.target