MUA v1.0.0 — Mikes Unraid Agent
Natives Unraid-Plugin: 21 Docker-, Netzwerk- und System-Tools als MCP-Server (Streamable HTTP) auf Port 3002. - mcp/server.php: MCP-Server (JSON-RPC 2.0, Streamable HTTP) - mcp/helpers.php: Lokale Tool-Implementierungen (kein SSH) - mcp/tools.php: 21 Tool-Definitionen - mcp/selftest.php: Selftest (12 Checks) - scripts/unraid-docker-mcp-helper.php: Write-Operationen - scripts/mua.service: systemd-Service - scripts/install.sh, update.sh, remove.sh: Plugin-Scripts - MUA.plg: Plugin-Manifest
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
# MUA - Mikes Unraid Agent
|
||||
# Install-Script
|
||||
# Wird vom Unraid-Plugin-Installer aufgerufen.
|
||||
|
||||
set -e
|
||||
|
||||
PLUGIN_DIR="/usr/local/plugins/mua"
|
||||
SERVICE_FILE="$PLUGIN_DIR/scripts/mua.service"
|
||||
HELPER_SRC="$PLUGIN_DIR/scripts/unraid-docker-mcp-helper.php"
|
||||
HELPER_DST="/usr/local/bin/unraid-docker-mcp-helper.php"
|
||||
|
||||
echo "=== MUA Install ==="
|
||||
|
||||
# 1. Verzeichnisse sicherstellen
|
||||
mkdir -p "$PLUGIN_DIR/mcp"
|
||||
mkdir -p "$PLUGIN_DIR/scripts"
|
||||
|
||||
# 2. PHP-Helper installieren (Write-Operationen)
|
||||
if [ -f "$HELPER_SRC" ]; then
|
||||
cp "$HELPER_SRC" "$HELPER_DST"
|
||||
chmod 755 "$HELPER_DST"
|
||||
echo " Helper installiert: $HELPER_DST"
|
||||
fi
|
||||
|
||||
# 3. systemd-Service installieren
|
||||
if [ -f "$SERVICE_FILE" ]; then
|
||||
cp "$SERVICE_FILE" /etc/systemd/system/mua.service
|
||||
chmod 644 /etc/systemd/system/mua.service
|
||||
systemctl daemon-reload
|
||||
echo " Service installiert: mua.service"
|
||||
fi
|
||||
|
||||
# 4. Service starten + enable
|
||||
systemctl enable mua.service
|
||||
systemctl restart mua.service
|
||||
|
||||
# 5. Health-Check
|
||||
sleep 2
|
||||
if curl -sf "http://127.0.0.1:3002/health" > /dev/null 2>&1; then
|
||||
echo " Health-Check: OK"
|
||||
echo "=== MUA installiert und läuft auf Port 3002 ==="
|
||||
echo " Endpunkt: http://$(hostname -I | awk '{print $1}'):3002/mcp"
|
||||
else
|
||||
echo " WARNUNG: Health-Check fehlgeschlagen"
|
||||
echo " Service-Status:"
|
||||
systemctl status mua.service --no-pager || true
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user