From c132b3985e24e557549544a1d10fb0daababdfb1 Mon Sep 17 00:00:00 2001 From: St33v Date: Wed, 25 Mar 2026 18:23:14 +1100 Subject: Update cremonde deployment and runtime checks --- setup.sh | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'setup.sh') diff --git a/setup.sh b/setup.sh index 14c2eec..f2707d9 100755 --- a/setup.sh +++ b/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail -# Run once on pestrel as root (or with sudo) to install the synoptic service. +# Run once on cremonde as root (or with sudo) to install the synoptic service. # Usage: sudo ./setup.sh if [ "$(id -u)" -ne 0 ]; then @@ -12,6 +12,12 @@ fi SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) OWNER=st33v +# --------------------------------------------------------------------------- +# Packages +# --------------------------------------------------------------------------- +echo "==> Installing required packages..." +pacman -Sy --needed --noconfirm curl imagemagick ghostscript nginx + # --------------------------------------------------------------------------- # Nginx conflict checks # --------------------------------------------------------------------------- @@ -45,13 +51,15 @@ install -d -o "$OWNER" -g "$OWNER" /opt/synoptic install -d -o "$OWNER" -g "$OWNER" /var/lib/synoptic install -d -o "$OWNER" -g "$OWNER" /var/lib/synoptic/archive install -d -o "$OWNER" -g "$OWNER" /var/lib/synoptic/archive/raw -install -d -o "$OWNER" -g "$OWNER" /srv/www +install -d /srv/www +install -d -o "$OWNER" -g "$OWNER" /srv/www/pestrel +chown "$OWNER:$OWNER" /srv/www/pestrel # --------------------------------------------------------------------------- # Web content # --------------------------------------------------------------------------- echo "==> Writing index.html..." -install -o "$OWNER" -g "$OWNER" -m 644 "$SCRIPT_DIR/index.html" /srv/www/index.html +install -o "$OWNER" -g "$OWNER" -m 644 "$SCRIPT_DIR/index.html" /srv/www/pestrel/index.html # --------------------------------------------------------------------------- # Systemd units @@ -69,14 +77,14 @@ systemctl enable --now synoptic.timer # --------------------------------------------------------------------------- # Nginx # --------------------------------------------------------------------------- -echo "==> Installing nginx config..." -install -m 644 "$SCRIPT_DIR/nginx/pestrel.com.conf" /etc/nginx/conf.d/synoptic.conf +#echo "==> Installing nginx config..." +#install -m 644 "$SCRIPT_DIR/nginx/pestrel.com.conf" /etc/nginx/conf.d/synoptic.conf -echo "==> Testing nginx config..." -nginx -t +#echo "==> Testing nginx config..." +#nginx -t -echo "==> Reloading nginx..." -systemctl reload nginx +#echo "==> Reloading nginx..." +#systemctl reload nginx # --------------------------------------------------------------------------- echo "==> Done." -- cgit v1.3