fix: preserve migrated storage guards during deployment

This commit is contained in:
hectorzhao
2026-08-31 23:01:35 +08:00
parent fd373d9708
commit 9a15d28da5
6 changed files with 78 additions and 1 deletions
+9
View File
@@ -1,6 +1,15 @@
#!/usr/bin/env bash
set -Eeuo pipefail
# Existing data-disk installations must fail before any initialization or release writes.
if [[ -e /etc/cmpp-platform/data-disk.uuid || -e /etc/systemd/system/postgresql.service.d/50-cmpp-data-disk.conf ]]; then
if [[ ! -x /usr/local/sbin/cmpp-data-storage-check ]]; then
echo "Missing CMPP data-disk guard; refusing to continue." >&2
exit 1
fi
/usr/local/sbin/cmpp-data-storage-check all
fi
APP_DIR="${APP_DIR:-/opt/cmpp-platform}"
REPO_URL="${REPO_URL:-http://175.27.255.91:3000/hectorzhao/lislgosms.git}"
BRANCH="${BRANCH:-main}"