mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-03-28 17:42:45 +01:00
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:
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user