Add Unraid updater script for mc-webui#24
Conversation
This script updates the mc-webui application on Unraid by pulling the latest git changes and managing Docker containers accordingly.
Enhance mc-webui Unraid updater script with detailed comments and improved logging.
|
Hi @Rafik89, first of all — I'm sorry for the late response. I've been deep in a major v2 migration effort over the past weeks, which consumed all my bandwidth. Thank you for your patience! I also want to say that the script itself is well-written, with solid practices like However, after reviewing the PR I've decided not to merge it in its current form. Here's my reasoning: 1. Outdated base branch 2. Overlap with existing update tooling 3. Unraid-specific hardcoded paths 4. Help text path mismatch That said, if you'd like to pursue getting this merged, here's what would be needed:
Thank you again for the contribution — it's clear you put real thought into this. Let me know if you'd like to rework it and I'm happy to take another look! |
📦 Unraid Automated Updater (User Scripts / cron)
This updater is designed for fully automated deployments on Unraid,
with safe branch switching and Docker cache protection.
It supports:
Sticky branch behavior (main / dev)
Safe rebuild when switching branches
Host-side version freeze before build
Runtime version verification from inside the container
Healthcheck waiting
Lock protection against concurrent runs
Designed for User Scripts plugin and cron automation
🔧 Usage with Unraid User Scripts
1️⃣ Install User Scripts plugin
Go to Plugins
Install User Scripts
Open Settings → User Scripts
2️⃣ Create a new script
Click Add New Script
Example name:
mc-webui-auto-updateClick Edit Script
3️⃣ Edit Script
4️⃣ Force update on specific branch
Always run on main
Always run on dev
Force rebuild (even without git changes)
5️⃣ Schedule execution
Inside User Scripts → Schedule:
🕒 Alternative: Use native cron (advanced)
Edit root crontab:
crontab -eAdd:
**0 3 * * * /mnt/user/appdata/mc-webui/scripts/updater/unraid-updater.sh >> /mnt/user/appdata/mc-webui/cron.log 2>&1**🧠 Notes
If you switch to dev, it will remain on dev until you explicitly switch back to main.
When switching branches, the script forces a clean rebuild of mc-webui
to prevent stale Docker build cache issues.
The script verifies the actual running version from inside the container.
Safe for unattended automated execution.