Initial commit: Minecraft dashboard
Next.js 16 + Tailwind v4 + shadcn v4 dashboard for managing a modded Forge 1.20.1 server. Includes server controls, player management, mod manager with Modrinth search and dependency resolution, world backups, snapshots, analytics, logs, and chat bridge. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
dd69c17c3b
77 changed files with 7007 additions and 0 deletions
32
scripts/scheduled-restart.sh
Executable file
32
scripts/scheduled-restart.sh
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
# Scheduled server restart with player warnings
|
||||
|
||||
RCON_PASS="23991818cc169249f181436f2a29a013"
|
||||
|
||||
send_rcon() {
|
||||
node -e "
|
||||
const { Rcon } = require('/home/minecraft/dashboard/node_modules/rcon-client');
|
||||
(async () => {
|
||||
try {
|
||||
const rcon = await Rcon.connect({ host: '127.0.0.1', port: 25575, password: '$RCON_PASS' });
|
||||
await rcon.send('say $1');
|
||||
rcon.end();
|
||||
} catch {}
|
||||
})();
|
||||
"
|
||||
}
|
||||
|
||||
# 5 minute warning
|
||||
send_rcon '§c[Server] Restarting in 5 minutes!'
|
||||
sleep 240
|
||||
|
||||
# 1 minute warning
|
||||
send_rcon '§c[Server] Restarting in 1 minute!'
|
||||
sleep 50
|
||||
|
||||
# 10 second warning
|
||||
send_rcon '§c[Server] Restarting in 10 seconds!'
|
||||
sleep 10
|
||||
|
||||
# Restart
|
||||
sudo systemctl restart minecraft.service
|
||||
Loading…
Add table
Add a link
Reference in a new issue