aboutsummaryrefslogtreecommitdiff
path: root/mc-backup.service
diff options
context:
space:
mode:
Diffstat (limited to 'mc-backup.service')
-rw-r--r--mc-backup.service15
1 files changed, 15 insertions, 0 deletions
diff --git a/mc-backup.service b/mc-backup.service
new file mode 100644
index 0000000..d94656c
--- /dev/null
+++ b/mc-backup.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Automatic backup of Minecraft Server
+
+[Service]
+Type=simple
+User=minecraftuser
+Group=minecraftuser
+ExecStart=/var/minecraft/server.sh backup
+Restart=on-failure
+RestartSec=10s
+StartLimitInterval=10min
+StartLimitBurst=3
+
+[Install]
+WantedBy=multi-user.target