diff --git a/Services/minecraft-hour.sh b/Services/minecraft-hour.sh index 01a5bf7..c1cc69f 100755 --- a/Services/minecraft-hour.sh +++ b/Services/minecraft-hour.sh @@ -50,8 +50,8 @@ done BACKUPDATE=$(date +"%Y-%m-%d_%H-%M-%S") mkdir "$BACKUPDIR/$BACKUPDATE" -/bin/tar c --exclude=behavior_packs/* --exclude=resource_packs/* "$SURVIVALDIR/worlds/Survival" | zbackup --nonencrypted backup "$BACKUPDIR/$BACKUPDATE-Survival" -/bin/tar c --exclude=behavior_packs/* --exclude=resource_packs/* "$CREATIVEDIR/worlds/Creative" | zbackup --nonencrypted backup "$BACKUPDIR/$BACKUPDATE-Creative" +/bin/tar c --exclude=behavior_packs/* --exclude=resource_packs/* "$SURVIVALDIR/worlds/Survival" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE-Survival" +/bin/tar c --exclude=behavior_packs/* --exclude=resource_packs/* "$CREATIVEDIR/worlds/Creative" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE-Creative" runAllWorlds "^u" runAllWorlds "save resume\n" diff --git a/Services/minecraft-stop.service b/Services/minecraft-stop.service new file mode 100755 index 0000000..97f71aa --- /dev/null +++ b/Services/minecraft-stop.service @@ -0,0 +1,11 @@ +[Unit] +Description=Properly shutdown Minecraft before PC shutdown + +[Service] +Type=oneshot +RemainAfterExit=true +User=bruno +ExecStop=/bin/sh /home/bruno/Apps/Minecraft/stopServers.sh + +[Install] +WantedBy=multi-user.target