diff options
| -rw-r--r-- | radar.brisbane.html | 18 | ||||
| -rw-r--r-- | radar.index.html | 15 | ||||
| -rw-r--r-- | radar.sydney.html | 18 | ||||
| -rwxr-xr-x | setup.sh | 6 | ||||
| -rw-r--r-- | systemd/radar-retry.service | 3 | ||||
| -rw-r--r-- | systemd/radar.service | 4 |
6 files changed, 57 insertions, 7 deletions
diff --git a/radar.brisbane.html b/radar.brisbane.html new file mode 100644 index 0000000..d3775d2 --- /dev/null +++ b/radar.brisbane.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<meta charset="utf-8"> +<title>Radar — Brisbane</title> +<style> + body { margin: 0; background: #000; display: flex; justify-content: center; align-items: center; height: 100vh; } + img { max-width: 100%; max-height: 100vh; } + nav { position: fixed; top: 0.5em; right: 0.75em; font-family: sans-serif; } + nav a { color: #888; text-decoration: none; font-size: 0.9em; } + nav a:hover { color: #fff; } +</style> +</head> +<body> + <img src="/idr663-loop.apng" alt="Brisbane radar loop"> + <nav><a href="/sydney/">← Sydney</a></nav> +</body> +</html> diff --git a/radar.index.html b/radar.index.html index 63ecec6..8043d15 100644 --- a/radar.index.html +++ b/radar.index.html @@ -2,11 +2,18 @@ <html lang="en"> <head> <meta charset="utf-8"> -<title>Radar — Sydney</title> +<title>Radar</title> <style> - body { margin: 0; background: #000; display: flex; justify-content: center; align-items: center; height: 100vh; } - img { max-width: 100%; max-height: 100vh; } + html, body { margin: 0; height: 100%; background: #000; color: #ccc; + font-family: sans-serif; } + body { display: flex; justify-content: center; align-items: center; gap: 4em; } + a { color: #ccc; text-decoration: none; font-size: 2em; padding: 0.5em 1em; + border: 1px solid #444; border-radius: 0.3em; } + a:hover { background: #222; color: #fff; } </style> </head> -<body><img src="/idr713-loop.apng" alt="Sydney radar loop"></body> +<body> + <a href="/sydney/">Sydney</a> + <a href="/brisbane/">Brisbane</a> +</body> </html> diff --git a/radar.sydney.html b/radar.sydney.html new file mode 100644 index 0000000..5c5c69d --- /dev/null +++ b/radar.sydney.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<meta charset="utf-8"> +<title>Radar — Sydney</title> +<style> + body { margin: 0; background: #000; display: flex; justify-content: center; align-items: center; height: 100vh; } + img { max-width: 100%; max-height: 100vh; } + nav { position: fixed; top: 0.5em; right: 0.75em; font-family: sans-serif; } + nav a { color: #888; text-decoration: none; font-size: 0.9em; } + nav a:hover { color: #fff; } +</style> +</head> +<body> + <img src="/idr713-loop.apng" alt="Sydney radar loop"> + <nav><a href="/brisbane/">Brisbane →</a></nav> +</body> +</html> @@ -63,13 +63,17 @@ chown "$OWNER:$OWNER" /srv/www/pestrel install -d -o "$OWNER" -g "$OWNER" /opt/radar install -d -o "$OWNER" -g "$OWNER" /var/lib/radar install -d -o "$OWNER" -g "$OWNER" /srv/www/radar +install -d -o "$OWNER" -g "$OWNER" /srv/www/radar/sydney +install -d -o "$OWNER" -g "$OWNER" /srv/www/radar/brisbane # --------------------------------------------------------------------------- # Web content # --------------------------------------------------------------------------- echo "==> Writing index.html..." install -o "$OWNER" -g "$OWNER" -m 644 "$SCRIPT_DIR/index.html" /srv/www/pestrel/index.html -install -o "$OWNER" -g "$OWNER" -m 644 "$SCRIPT_DIR/radar.index.html" /srv/www/radar/index.html +install -o "$OWNER" -g "$OWNER" -m 644 "$SCRIPT_DIR/radar.index.html" /srv/www/radar/index.html +install -o "$OWNER" -g "$OWNER" -m 644 "$SCRIPT_DIR/radar.sydney.html" /srv/www/radar/sydney/index.html +install -o "$OWNER" -g "$OWNER" -m 644 "$SCRIPT_DIR/radar.brisbane.html" /srv/www/radar/brisbane/index.html echo "==> Installing radarFetch.sh..." install -o "$OWNER" -g "$OWNER" -m 755 "$SCRIPT_DIR/radarFetch.sh" /opt/radar/radarFetch.sh diff --git a/systemd/radar-retry.service b/systemd/radar-retry.service index b878303..0a439fa 100644 --- a/systemd/radar-retry.service +++ b/systemd/radar-retry.service @@ -5,7 +5,8 @@ Description=Retry BOM radar fetch (after failure) Type=oneshot User=st33v WorkingDirectory=/var/lib/radar -ExecStart=/opt/radar/radarFetch.sh +ExecStart=-/opt/radar/radarFetch.sh IDR713 +ExecStart=-/opt/radar/radarFetch.sh IDR663 ExecStopPost=/bin/sh -c 'STATUS=SUCCESS; [ "$$EXIT_STATUS" != "0" ] && STATUS=FAILURE; logger -t radar-retry -p user.err "radar-retry $$STATUS exit=$$EXIT_STATUS"' SyslogIdentifier=radar-retry StandardOutput=journal diff --git a/systemd/radar.service b/systemd/radar.service index 8e9dd40..6995637 100644 --- a/systemd/radar.service +++ b/systemd/radar.service @@ -6,7 +6,9 @@ OnFailure=radar-retry.timer Type=oneshot User=st33v WorkingDirectory=/var/lib/radar -ExecStart=/opt/radar/radarFetch.sh +# `-` prefix: one radar's failure does not skip the next +ExecStart=-/opt/radar/radarFetch.sh IDR713 +ExecStart=-/opt/radar/radarFetch.sh IDR663 ExecStopPost=/bin/sh -c 'STATUS=SUCCESS; [ "$$EXIT_STATUS" != "0" ] && STATUS=FAILURE; logger -t radar -p user.err "radar $$STATUS exit=$$EXIT_STATUS"' SyslogIdentifier=radar StandardOutput=journal |
