← back to Parked Landers
deploy.sh
15 lines
#!/bin/bash
# Runs ON Mac2 (Steve: `! bash ~/Projects/parked-landers/deploy.sh`). Returns FAST.
# rsync sites up, push the remote script, launch it DETACHED on Kamatera (so 8 cert issuances
# don't block past the 2-min `!` limit). Then run status.sh to see the result.
K="root@45.61.58.125"
echo "[1/3] rsync landers -> Kamatera…"
rsync -az "$HOME/Projects/parked-landers/sites/" "$K:/var/www/parked-landers/" && echo " rsync ok" || { echo " rsync FAILED"; exit 1; }
echo "[2/3] push remote script…"
scp -q "$HOME/Projects/parked-landers/deploy-remote.sh" "$K:/tmp/deploy-remote.sh" && echo " scp ok" || { echo " scp FAILED"; exit 1; }
echo "[3/3] launch remote (vhost+certbot+verify) DETACHED…"
ssh "$K" 'nohup bash /tmp/deploy-remote.sh > /tmp/deploy-remote.log 2>&1 & echo " launched pid=$!"'
echo
echo "Running in background on Kamatera (~1-2 min for 8 certs)."
echo "Check it with: ! bash ~/Projects/parked-landers/status.sh"