1
0
forked from iarv/mc-webui

fix: Improve updater install script and revert test commit

- Add -u flag to Python for unbuffered logging to journald
- Configure git safe.directory automatically during install
- Revert test marker from base.html

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-01-21 21:38:04 +01:00
parent 60c56b9fb8
commit dd7bdca803
2 changed files with 6 additions and 2 deletions

View File

@@ -60,7 +60,7 @@
</div>
<div class="px-3 pb-2 text-muted small border-bottom d-flex align-items-center justify-content-between">
<span id="versionDisplay">
<i class="bi bi-tag"></i> <span id="versionText">{{ version }}</span> <span class="text-success">(test ok!)</span>
<i class="bi bi-tag"></i> <span id="versionText">{{ version }}</span>
<span class="badge bg-secondary ms-1" id="branchBadge">{{ git_branch }}</span>
</span>
<button id="checkUpdateBtn" class="btn btn-sm btn-outline-secondary py-0 px-1" title="Check for updates">

View File

@@ -75,6 +75,10 @@ if [ ! -f "$MCWEBUI_DIR/scripts/update.sh" ]; then
error "update.sh not found in $MCWEBUI_DIR/scripts/"
fi
# Configure git safe.directory for root (required since service runs as root)
info "Configuring git safe.directory..."
git config --global --add safe.directory "$MCWEBUI_DIR" 2>/dev/null || true
# Create service file with correct paths
info "Creating systemd service file..."
cat > "$SERVICE_FILE" << EOF
@@ -88,7 +92,7 @@ Type=simple
User=root
Environment=MCWEBUI_DIR=${MCWEBUI_DIR}
Environment=UPDATER_TOKEN=
ExecStart=/usr/bin/python3 ${SCRIPT_DIR}/updater.py
ExecStart=/usr/bin/python3 -u ${SCRIPT_DIR}/updater.py
Restart=always
RestartSec=5