Seed from NAS prod snapshot 20260130-190531
This commit is contained in:
12
ops/smoke.sh
Normal file
12
ops/smoke.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
PORT="${1:-8081}"
|
||||
BASE="http://127.0.0.1:${PORT}"
|
||||
|
||||
echo "Smoke test ${BASE}"
|
||||
curl -fsSI "${BASE}/" | head -n 5
|
||||
curl -fsSI "${BASE}/pagefind/pagefind.js" | head -n 5
|
||||
curl -fsSI "${BASE}/pagefind/pagefind-ui.js" | head -n 5 || true
|
||||
curl -fsSI "${BASE}/pagefind/pagefind-ui.css" | head -n 5 || true
|
||||
curl -fsSI "${BASE}/pagefind/pagefind-entry.json" | head -n 5 || true
|
||||
echo "OK"
|
||||
24
ops/which-live.sh
Normal file
24
ops/which-live.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
DOMAIN="https://archicratie.trans-hands.synology.me"
|
||||
A="http://127.0.0.1:8081"
|
||||
B="http://127.0.0.1:8082"
|
||||
|
||||
etag() { curl -ksI "$1/" | awk -F': ' 'tolower($1)=="etag"{print $2}' | tr -d '\r'; }
|
||||
|
||||
E_D="$(etag "$DOMAIN")"
|
||||
E_A="$(etag "$A")"
|
||||
E_B="$(etag "$B")"
|
||||
|
||||
echo "DOMAIN ETag: $E_D"
|
||||
echo "8081 ETag: $E_A"
|
||||
echo "8082 ETag: $E_B"
|
||||
|
||||
if [ -n "$E_D" ] && [ "$E_D" = "$E_A" ]; then
|
||||
echo "LIVE=8081 (slot blue probable)"
|
||||
elif [ -n "$E_D" ] && [ "$E_D" = "$E_B" ]; then
|
||||
echo "LIVE=8082 (slot green probable)"
|
||||
else
|
||||
echo "LIVE=INCONNU (ETag mismatch)"
|
||||
fi
|
||||
Reference in New Issue
Block a user