From 96a9cd525e7caf46704ba2240c1c86f6892e3aaf Mon Sep 17 00:00:00 2001 From: St33v Date: Sun, 15 Mar 2026 15:48:10 +1100 Subject: 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 --- func/deriveTimeString.sh | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100755 func/deriveTimeString.sh (limited to 'func') diff --git a/func/deriveTimeString.sh b/func/deriveTimeString.sh deleted file mode 100755 index a09a393..0000000 --- a/func/deriveTimeString.sh +++ /dev/null @@ -1,33 +0,0 @@ - -# BOM releases four synoptic charts per day. -# They are named according to the UTC dat/time for which they are valid. -# -# Filenames follow this template: IDY00030.YYYYMMDDHHMM.[png|pdf] -# -# IDY00030 = the asset name (i.e. the Mean Sea Level Pressure synoptic chart) -# . -# -# . -# (I want pdf because it contains a Scalable Vectort Graphic (SVG) image) - - -# This function returns the filename for the most recent chart. - -DeriveTime() { - nowDate=$(\date -u +%Y%m%d) # backslash req. to unalias date to raw format - nowTime=$(\date -u +%H%M) # (I have date aliased to date -R) -# echo $nowDate$nowTime - - if [ $nowTime -ge 1800 ] ; then - fileTime=1800 - elif [ $nowTime -ge 1200 ] ; then - fileTime=1200 - elif [ $nowTime -ge 0600 ] ; then - fileTime=0600 - else - fileTime=0000 - fi - - echo $nowDate$fileTime -} - -- cgit v1.3