Current functionality to replicate
Current files
opt
├── activity
│ └── calculate_activity.pl
├── bin
│ ├── auto_reboot.sh
│ ├── keep_alive.sh
│ ├── maintenance
│ │ └── log_rotator.sh
│ ├── name2uuid.sh
│ ├── nightly_maintenance.sh
│ └── uuid2name.sh
├── give_on_log_in
│ ├── birthdays.pl
│ ├── christmas.pl
│ └── random_gift.pl
├── log_in.pl
├── log_monitor.pl
└── op_monitor.pl
All Perl (.pl) files can probably get implemented in Go (mmm).
Perl script functionality to keep
- log_monitor.pl - tested [ ]
- Manages commands: - tested [x]
- op me - tested [x]
- Matches arbitrary regexes and runs commands - tested [x]
- stuck in the vault! - currently inactive - tested [x]
- Runs accounting - tested [ ]
- Logs log in - tested [x]
- Logs log out - tested [x]
- Sets player status online - tested [x]
- Sets player status offline - tested [x]
- Manages commands: - tested [x]
- log_in.pl - tested [x]
- Greet player - tested [x]
- Give random gift - tested [x]
- op_monitor.pl - tested [x]
- Checks if player can become an operator - tested [x]
- Makes them an operator - tested [x]
- Sleeps for DURATION then removes operator status and creative mode - tested [x]
- calculate_activity.pl - tested [x]
- For each player, get the "join" and "left" times from the activity log file - tested [x]
- Calculate the time spent online - tested [x]
- Log for the website - tested [x]
Shell script functionality to keep
- Server failure checking (auto_reboot.sh) - tested [x]
gunzipthe Minecraft server logs (part of log_rotator.sh) - tested [ ]- Nightly restart the Minecraft server (nightly_maintenance.sh) - tested [ ]
Additional stuff to do
- systemd service file
Roadmap
This section should have been converted into Issues
- SQLite - https://github.com/forquare/Manaha-Minder/issues/9
- Operator locks - https://github.com/forquare/Manaha-Minder/issues/10
- Player status - https://github.com/forquare/Manaha-Minder/issues/11
- Player activity - https://github.com/forquare/Manaha-Minder/issues/12
- Custom Actions - https://github.com/forquare/Manaha-Minder/issues/13
- Shell scripts - https://github.com/forquare/Manaha-Minder/issues/14
- Operator only - https://github.com/forquare/Manaha-Minder/issues/15
- Regex groups - https://github.com/forquare/Manaha-Minder/issues/16
- Revisit logging - https://github.com/forquare/Manaha-Minder/issues/6
- Workflows
Shell script descriptions
auto_reboot.sh
Checks the logs for a thread or watchdog error, if there is one detected it will stop the server and also go ahead and try to force kill it if it's not responding.
keep_alive.sh
Checks if the log_monitor.pl is running and functional, if not it will restart it.
log_rotator.sh
I think this used to check some manaha-opt-tools logs, but since this wasn't documentented I didn't set up the output redirection in cron for it.
It does still gunzip the Minecraft server logs.
nightly_maintenance.sh
Restarts the Minecraft server.
It also used to generate the map, but now we use Bluemap.
name2uuid.sh
Finds the UUID of a player by their name.
This is a convenience script for me, it's not used by other scripts.
uuid2name.sh
Finds the name of a player by their UUID.
This is a convenience script for me, it's not used by other scripts.