← back to Abramsagency

golive-finish.sh

10 lines

#!/usr/bin/env bash
# Full restart so the specific-IP bind + hash rebuild take effect, then verify PUBLIC.
set -euo pipefail
SRV=root@45.61.58.125
ssh -o StrictHostKeyChecking=accept-new "$SRV" 'systemctl restart nginx && sleep 1 && \
echo "== PUBLIC cert (45.61.58.125:443, SNI agency) ==" && \
echo | openssl s_client -servername agency.agentabrams.com -connect 45.61.58.125:443 2>/dev/null | openssl x509 -noout -subject && \
echo "== https status from the box ==" && \
curl -s -m 10 -o /dev/null -w "https=%{http_code}\n" https://agency.agentabrams.com/'