25 lines
650 B
Bash
25 lines
650 B
Bash
#!/bin/bash
|
|
cd /home/container
|
|
|
|
echo "=== GameDig Server Status API ==="
|
|
|
|
# config.json prüfen
|
|
if [ ! -f "config.json" ]; then
|
|
echo "[FEHLER] config.json nicht gefunden!"
|
|
echo "[INFO] Bitte config.json über den Pterodactyl-Dateimanager anlegen."
|
|
echo "[INFO] Vorlage: https://gitea.cap-net.ch/Cap/gameserver-status-api/raw/branch/main/config.json"
|
|
exit 1
|
|
fi
|
|
|
|
# node_modules prüfen
|
|
if [ ! -d "node_modules/gamedig" ]; then
|
|
echo "[INFO] Installiere Node-Abhängigkeiten..."
|
|
npm install --omit=dev
|
|
echo "[INFO] Installation abgeschlossen."
|
|
fi
|
|
|
|
echo "[INFO] Starte server.js..."
|
|
echo ""
|
|
|
|
node /home/container/server.js
|