ops: add Cloudflare R2 creds (backups + images, EU jurisdiction)
This commit is contained in:
parent
30fc381a83
commit
252d9fb2ee
3 changed files with 62 additions and 0 deletions
21
scripts/install-nanomq.sh
Normal file
21
scripts/install-nanomq.sh
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
# Install NanoMQ from the latest GitHub release .deb (amd64).
|
||||
set -euo pipefail
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
api="https://api.github.com/repos/nanomq/nanomq/releases/latest"
|
||||
echo "[1] querying latest release…"
|
||||
debs=$(curl -fsSL "$api" | grep -oE 'https://[^" ]+\.deb')
|
||||
echo "all .deb assets:"; echo "$debs"
|
||||
url=$(echo "$debs" | grep -iE 'amd64|x86_64|x86-64' | grep -viE 'arm|aarch' | head -1)
|
||||
if [ -z "${url:-}" ]; then
|
||||
echo "[!] no amd64 .deb in latest release; aborting"
|
||||
exit 1
|
||||
fi
|
||||
echo "[2] downloading: $url"
|
||||
curl -fsSL -o /tmp/nanomq.deb "$url"
|
||||
echo "[3] installing…"
|
||||
apt-get install -y /tmp/nanomq.deb 2>&1 | tail -3
|
||||
rm -f /tmp/nanomq.deb
|
||||
echo "[4] version:"
|
||||
(nanomq --version 2>&1 | head -3) || (echo "binary at:"; dpkg -L nanomq | grep -E 'bin/nanomq$' || true)
|
||||
Loading…
Add table
Add a link
Reference in a new issue