minecraft-systemd-services/README.md

90 lines
2.8 KiB
Markdown
Raw Normal View History

# What Is Minecraft Server Systemd Services?
Systemd unit files for use with the Minecraft Server and associated services
(backup and stats).
# Features
- Supports use with Minecraft server software PaperMC, SpigotMC and Vanilla.
- Backup the Minecraft server directory.
- To an archive.
- Sync to a desired destination.
- Keep [MinecraftStats](https://github.com/pdinklag/MinecraftStats) data synced.
# System Requirements
- GNU Linux operating System
- [Wardenctl](https://gitlab.com/adouglas/wardenctl)
# Installation
**Assumptions**
- Installed all required dependencies as stated in
[System Requirements](#system-requirements) section.
- Dependencies are accessible via
[environment PATH](https://wiki.archlinux.org/index.php/Environment_variables).
- Installation is done via Linux CLI.
- Steps prefixed with a "$" (dollar sign) represents the CLI prompt. The text
after the "$" is to be entered at the CLI.
- Steps prefixed with a "#" (number sign) represents the CLI prompt with
elevated user permissions (e.g. root). The text after the "#" is to be entered
at the CLI.
- A single backslash character beside another character is used to escape the
proceeding character. In this case backslash character is not to to be entered
at the CLI.
- These instructions are an example of installation and configuration.
## On Linux - Manual
1. Change to your home directory.
```console
$ cd ~
```
1. Download the project.
```console
$ git clone git@gitlab.com:adouglas/minecraft-systemd-services.git
```
1. Change to the project directory.
```console
$ cd minecraft-systemd-services
```
1. Set file permissions.
```console
$ chmod 644 minecraft-\*
```
1. Set file ownership and group.
```console
$ chown root:root minecraft-\*
```
1. Move Systemd unit files.
```console
# mv minecraft-\* /etc/systemd/system/
```
1. Enable services.
```console
# systemctl enable minecraft-paper.service
# systemctl enable minecraft-backup.timer
# systemctl enable minecraft-stats.timer
```
# Usage
For an even simpler usage at the CLI run "wardenctl help" without double quotes.
## Useful Command Examples
Action | Command Example | Notes
---------------------|-----------------------|--------
Reload all unit files| systemctl daemon-reload | Required after modifying unit file(s).
Restart unit | systemctl restart minecraft-paper.service |
Start unit | systemctl start minecraft-paper.service |
Stop unit | systemctl stop minecraft-paper.service |
View unit status | systemctl status minecraft-paper.service |
View unit messages | journalctl -u minecraft-paper.service |
View unit messages | journalctl -fu minecraft-paper.service | View most recent entries and follow new entries as they occur. Press CTRL-C to quit.
# Copyright Notice
Copyright (c) 2019-2020 Adam Douglas Some Rights Reserved