Fix Docker apply crash and add safe profile test flow
Remove invalid _mirror_manager from daemon.json that prevented Docker from starting. Add 2-minute test apply with auto-rollback, final apply confirmation, emergency-restore CLI/UI, and post-restart Docker health checks. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+25
-18
@@ -1,18 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
INSTALL_DIR="${1:-/opt/mirror-manager}"
|
||||
BIN="/usr/local/bin/mirror-manager"
|
||||
|
||||
echo "نصب Mirror Manager CLI..."
|
||||
sudo mkdir -p /var/lib/mirror-manager/data
|
||||
sudo cp "$INSTALL_DIR/mirror-manager" "$BIN"
|
||||
sudo chmod +x "$BIN"
|
||||
|
||||
PROFILE_D="/etc/profile.d/mirror-manager.sh"
|
||||
echo "export PYTHONPATH=$INSTALL_DIR" | sudo tee "$PROFILE_D" > /dev/null
|
||||
echo "export MIRROR_CONTAINER_NAME=mirror-manager" | sudo tee -a "$PROFILE_D" > /dev/null
|
||||
|
||||
echo "CLI نصب شد: mirror-manager"
|
||||
echo " mirror-manager status"
|
||||
echo " mirror-manager restore --initial"
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
|
||||
INSTALL_DIR="${1:-/opt/mirror-manager}"
|
||||
|
||||
BIN="/usr/local/bin/mirror-manager"
|
||||
|
||||
|
||||
|
||||
echo "نصب Mirror Manager CLI..."
|
||||
|
||||
sudo mkdir -p /var/lib/mirror-manager/data
|
||||
|
||||
sudo cp "$INSTALL_DIR/mirror-manager" "$BIN"
|
||||
|
||||
sudo chmod +x "$BIN"
|
||||
|
||||
|
||||
|
||||
PROFILE_D="/etc/profile.d/mirror-manager.sh"
|
||||
|
||||
{
|
||||
Reference in New Issue
Block a user