← back to Marketing Command Center
Add deploy/apply-cutover.sh — paste-safe one-command nginx cutover/restore (backup+install+test+reload+verify)
9ef59f0e3173e4e8f58c938f15049f7411703c45 · 2026-07-15 14:28:29 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Files touched
A deploy/apply-cutover.sh
Diff
commit 9ef59f0e3173e4e8f58c938f15049f7411703c45
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 15 14:28:29 2026 -0700
Add deploy/apply-cutover.sh — paste-safe one-command nginx cutover/restore (backup+install+test+reload+verify)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---
deploy/apply-cutover.sh | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/deploy/apply-cutover.sh b/deploy/apply-cutover.sh
new file mode 100755
index 0000000..7aac0f4
--- /dev/null
+++ b/deploy/apply-cutover.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+# Apply the DW-marketing consolidation cutover on Kamatera (run AS ROOT on the box).
+# Backs up the live vhost, installs the corrected config (MCC front door + public
+# /reels/*.mp4 + /privacy + /terms passthroughs to the reels app :9848), tests, reloads.
+# Idempotent + safe: aborts if nginx -t fails (no reload on bad config).
+set -euo pipefail
+
+SRC=/root/DW-Agents/marketing-command-center/deploy/nginx/marketing.designerwallcoverings.com.conf
+BK=/root/nginx-backup-$(date +%F-%H%M%S)
+mkdir -p "$BK"
+
+echo "→ locating live vhost for marketing.designerwallcoverings.com…"
+LIVE=$(grep -rl "server_name marketing.designerwallcoverings.com" /etc/nginx/sites-available /etc/nginx/conf.d 2>/dev/null | head -1 || true)
+echo " live vhost: ${LIVE:-<none — will create in sites-available>}"
+
+if [ -n "${LIVE:-}" ]; then
+ cp "$LIVE" "$BK/" && echo " backed up live vhost → $BK/"
+ DEST="$LIVE"
+else
+ DEST=/etc/nginx/sites-available/marketing.designerwallcoverings.com.conf
+fi
+
+echo "→ installing corrected config → $DEST"
+cp "$SRC" "$DEST"
+# ensure it's enabled if using sites-available/sites-enabled layout
+if [ -d /etc/nginx/sites-enabled ] && [ ! -e "/etc/nginx/sites-enabled/$(basename "$DEST")" ]; then
+ ln -sf "$DEST" "/etc/nginx/sites-enabled/$(basename "$DEST")" && echo " symlinked into sites-enabled/"
+fi
+
+echo "→ nginx -t"
+nginx -t
+
+echo "→ reloading nginx"
+systemctl reload nginx
+echo "✓ RELOADED_OK (backup at $BK)"
+
+echo "→ verify (expect 200s):"
+for u in /privacy /terms; do
+ printf " %s -> " "$u"; curl -s -o /dev/null -w "%{http_code}\n" "https://marketing.designerwallcoverings.com$u" || echo "curl-failed"
+done
← 4a03044 accounts panel: use live Meta token-health so a dead token f
·
back to Marketing Command Center
·
channels: Meta connect now upgrades short→long-lived token + 81c03cf →