diff options
| author | St33v <github@f3rr3t.com> | 2026-03-25 18:23:14 +1100 |
|---|---|---|
| committer | St33v <github@f3rr3t.com> | 2026-03-25 18:23:14 +1100 |
| commit | c132b3985e24e557549544a1d10fb0daababdfb1 (patch) | |
| tree | 03a22b64a9d0742f3313b23a6ec0acee31fbc4c9 /synopticChart.sh | |
| parent | 0b7ad7787794e7e0f14eb3e6ada7139fd1b47c78 (diff) | |
Update cremonde deployment and runtime checks
Diffstat (limited to 'synopticChart.sh')
| -rwxr-xr-x | synopticChart.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/synopticChart.sh b/synopticChart.sh index f209beb..059665d 100755 --- a/synopticChart.sh +++ b/synopticChart.sh @@ -5,11 +5,23 @@ set -euo pipefail # Download BOM synoptic chart (IDY00030) and publish as PNG. # BOM permits anonymous FTP for personal use. # Charts are valid at 00, 06, 12, 18 UTC; files appear ~2h later. -# Deployed to /opt/synoptic/synopticChart.sh on pestrel.com. +# Deployed to /opt/synoptic/synopticChart.sh on cremonde for pestrel.com. ARCHIVE_DIR=/var/lib/synoptic/archive RAW_DIR=/var/lib/synoptic/archive/raw -LATEST=/srv/www/synopticLatest.png +LATEST=/srv/www/pestrel/synopticLatest.png + +require_cmd() { + local cmd="$1" + if ! command -v "$cmd" >/dev/null 2>&1; then + echo "Required command not found: ${cmd}" >&2 + exit 127 + fi +} + +require_cmd curl +require_cmd magick +require_cmd gs # Return the datetime string for the most recently published chart slot. # BOM chart slots: 0000, 0600, 1200, 1800 UTC. |
