minecraft-monitor/README.md

19 lines
1.0 KiB
Markdown
Raw Normal View History

2019-08-01 12:43:16 +00:00
A minimalist systemd service that periodically polls a minecraft server and logs player activity. This requires the minecraft server to have `enable-query=true`.
The script is currently set up to poll `xkcd.cbouton.com` and produce a graph for the past *hour*, *day*, *month*, *4 months* and *18 months*. The graph is generated from `template.html`, an SVG inside an auto-refreshing HTML page.
# Installation
Nothing in the installation process is automated so far:
1. Install Python 3.x
2. Perform `pip install mcstatus` in the monitor folder
3. Set the `PATH` in `xkcdstatus.service` to the monitor folder.
4. Optionally move the *web* subfolder to a location in your webserver root
5. Set the arguments in `xkcraftia-monitor.sh` to point to the *web* subfolder
6. Move `xkcdstatus.service` and `xkcdstatus.timer` to `/etc/systemd/system/`
7. Enable and start the timer
```
sudo systemctl enable xkcdstatus.timer
sudo systemctl start xkcdstatus.timer
```
# Demo
See a live version of the monitor at [xkcd.flumble.nl](https://xkcd.flumble.nl/)