summaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
authorSt33v <github@f3rr3t.com>2026-03-15 15:48:10 +1100
committerSt33v <github@f3rr3t.com>2026-03-15 15:48:10 +1100
commit96a9cd525e7caf46704ba2240c1c86f6892e3aaf (patch)
tree11f022a651adc766256e00d4dd8bf18f4ab46e35 /deploy.sh
parent078d16785d7b027aead68f59d1c1b4dd18cd5267 (diff)
Add deployment config and strengthen synopticChart.sh
- Inline DeriveTime from func/deriveTimeString.sh; delete func/ - Add set -euo pipefail, quoting, and stderr for error messages - Archive PDFs to /var/lib/synoptic/archive/raw/ after conversion - Publish PNG to /srv/www/synopticLatest.png - Add systemd units: synoptic.{service,timer}, synoptic-retry.{service,timer} - Timer fires at 02:10, 08:10, 14:10, 20:10 UTC (2h after BOM publish slots) - Add nginx site config for pestrel.com - Add setup.sh (run once on VPS as root) and deploy.sh (run from cr4y) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 0000000..bb1badb
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -euo pipefail
+
+REMOTE=st33v@pestrel.com
+PORT=40022
+
+echo "Deploying synopticChart.sh to ${REMOTE}..."
+scp -P "$PORT" synopticChart.sh "${REMOTE}:/opt/synoptic/synopticChart.sh"
+
+echo "Restarting synoptic.service..."
+if ssh -p "$PORT" "$REMOTE" "sudo systemctl restart synoptic.service"; then
+ echo "SUCCESS: synoptic.service ran cleanly."
+else
+ echo "FAILURE: synoptic.service exited non-zero." >&2
+ exit 1
+fi