summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.html16
-rw-r--r--nginx/radar.pestrel.com.conf26
-rw-r--r--radar.brisbane.html28
-rw-r--r--radar.cairns.html32
-rw-r--r--radar.canberra.html32
-rw-r--r--radar.index.html15
-rw-r--r--radar.sydney.html28
-rwxr-xr-xsetup.sh4
-rw-r--r--systemd/radar-retry.service2
-rw-r--r--systemd/radar.service2
10 files changed, 159 insertions, 26 deletions
diff --git a/index.html b/index.html
index 0aa07c7..219680a 100644
--- a/index.html
+++ b/index.html
@@ -2,12 +2,24 @@
<html lang="en">
<head>
<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Synoptic</title>
<style>
body { margin: 0; background: #000; display: flex; justify-content: center; align-items: center; height: 100vh; }
img { max-width: 100%; max-height: 100vh; }
+ a.nav-button {
+ position: fixed; left: 0; top: 16.6%;
+ color: #aaa; background: rgba(0,0,0,0.7);
+ padding: 0.45em 0.9em;
+ border: 1px solid #444; border-left: none;
+ border-radius: 0 0.3em 0.3em 0;
+ text-decoration: none; font-family: sans-serif; font-size: 0.95em;
+ }
+ a.nav-button:hover { color: #fff; border-color: #888; }
</style>
</head>
-<body><img src="/synopticLatest.png" alt="Latest synoptic"></body>
+<body>
+ <img src="/synopticLatest.png" alt="Latest synoptic">
+ <a class="nav-button" href="https://radar.pestrel.com/">Radars</a>
+</body>
</html>
-
diff --git a/nginx/radar.pestrel.com.conf b/nginx/radar.pestrel.com.conf
index b7d9c08..968bf2c 100644
--- a/nginx/radar.pestrel.com.conf
+++ b/nginx/radar.pestrel.com.conf
@@ -1,12 +1,8 @@
-# BOM radar loop — radar.pestrel.com
+# BOM radar loops — radar.pestrel.com
# Installed to /etc/nginx/conf.d/radar.conf by setup.sh
-#
-# Requires /etc/nginx/nginx.conf to include:
-# include /etc/nginx/conf.d/*.conf;
+# TLS block added by `certbot --nginx -d radar.pestrel.com`.
server {
- listen 80;
- listen [::]:80;
server_name radar.pestrel.com;
root /srv/www/radar;
@@ -20,4 +16,22 @@ server {
location / {
try_files $uri $uri/ =404;
}
+
+ listen 443 ssl; # managed by Certbot
+ listen [::]:443 ssl; # managed by Certbot
+ ssl_certificate /etc/letsencrypt/live/radar.pestrel.com/fullchain.pem; # managed by Certbot
+ ssl_certificate_key /etc/letsencrypt/live/radar.pestrel.com/privkey.pem; # managed by Certbot
+ include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
+ ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
+}
+
+server {
+ if ($host = radar.pestrel.com) {
+ return 301 https://$host$request_uri;
+ } # managed by Certbot
+
+ listen 80;
+ listen [::]:80;
+ server_name radar.pestrel.com;
+ return 404; # managed by Certbot
}
diff --git a/radar.brisbane.html b/radar.brisbane.html
index d3775d2..d432c72 100644
--- a/radar.brisbane.html
+++ b/radar.brisbane.html
@@ -2,17 +2,31 @@
<html lang="en">
<head>
<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<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; }
+ html, body { margin: 0; background: #000; min-height: 100vh; }
+ body { display: flex; flex-direction: column; min-height: 100vh; }
+ nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6em;
+ padding: 0.6em; font-family: sans-serif; }
+ nav a { color: #aaa; text-decoration: none; font-size: 0.95em;
+ padding: 0.35em 0.9em; border: 1px solid #333; border-radius: 0.3em; }
+ nav a:hover { color: #fff; border-color: #777; }
+ nav a.current { color: #fff; border-color: #888; background: #1a1a1a; }
+ main { flex: 1; display: flex; justify-content: center; align-items: center;
+ min-height: 0; }
+ img { width: 100%; max-width: 512px; max-height: 100%; height: auto;
+ display: block; }
</style>
</head>
<body>
- <img src="/idr663-loop.apng" alt="Brisbane radar loop">
- <nav><a href="/sydney/">← Sydney</a></nav>
+ <nav>
+ <a href="/sydney/">Sydney</a>
+ <a class="current" href="/brisbane/">Brisbane</a>
+ <a href="/canberra/">Canberra</a>
+ <a href="/cairns/">Cairns</a>
+ <a href="https://pestrel.com/">Synoptic</a>
+ </nav>
+ <main><img src="/idr663-loop.apng" alt="Brisbane radar loop"></main>
</body>
</html>
diff --git a/radar.cairns.html b/radar.cairns.html
new file mode 100644
index 0000000..d4f3438
--- /dev/null
+++ b/radar.cairns.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>Radar — Cairns</title>
+<style>
+ html, body { margin: 0; background: #000; min-height: 100vh; }
+ body { display: flex; flex-direction: column; min-height: 100vh; }
+ nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6em;
+ padding: 0.6em; font-family: sans-serif; }
+ nav a { color: #aaa; text-decoration: none; font-size: 0.95em;
+ padding: 0.35em 0.9em; border: 1px solid #333; border-radius: 0.3em; }
+ nav a:hover { color: #fff; border-color: #777; }
+ nav a.current { color: #fff; border-color: #888; background: #1a1a1a; }
+ main { flex: 1; display: flex; justify-content: center; align-items: center;
+ min-height: 0; }
+ img { width: 100%; max-width: 512px; max-height: 100%; height: auto;
+ display: block; }
+</style>
+</head>
+<body>
+ <nav>
+ <a href="/sydney/">Sydney</a>
+ <a href="/brisbane/">Brisbane</a>
+ <a href="/canberra/">Canberra</a>
+ <a class="current" href="/cairns/">Cairns</a>
+ <a href="https://pestrel.com/">Synoptic</a>
+ </nav>
+ <main><img src="/idr193-loop.apng" alt="Cairns radar loop"></main>
+</body>
+</html>
diff --git a/radar.canberra.html b/radar.canberra.html
new file mode 100644
index 0000000..09f1200
--- /dev/null
+++ b/radar.canberra.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>Radar — Canberra</title>
+<style>
+ html, body { margin: 0; background: #000; min-height: 100vh; }
+ body { display: flex; flex-direction: column; min-height: 100vh; }
+ nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6em;
+ padding: 0.6em; font-family: sans-serif; }
+ nav a { color: #aaa; text-decoration: none; font-size: 0.95em;
+ padding: 0.35em 0.9em; border: 1px solid #333; border-radius: 0.3em; }
+ nav a:hover { color: #fff; border-color: #777; }
+ nav a.current { color: #fff; border-color: #888; background: #1a1a1a; }
+ main { flex: 1; display: flex; justify-content: center; align-items: center;
+ min-height: 0; }
+ img { width: 100%; max-width: 512px; max-height: 100%; height: auto;
+ display: block; }
+</style>
+</head>
+<body>
+ <nav>
+ <a href="/sydney/">Sydney</a>
+ <a href="/brisbane/">Brisbane</a>
+ <a class="current" href="/canberra/">Canberra</a>
+ <a href="/cairns/">Cairns</a>
+ <a href="https://pestrel.com/">Synoptic</a>
+ </nav>
+ <main><img src="/idr403-loop.apng" alt="Canberra radar loop"></main>
+</body>
+</html>
diff --git a/radar.index.html b/radar.index.html
index 8043d15..0bfea50 100644
--- a/radar.index.html
+++ b/radar.index.html
@@ -2,18 +2,25 @@
<html lang="en">
<head>
<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Radar</title>
<style>
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; }
+ body { display: flex; flex-wrap: wrap; justify-content: center;
+ align-items: center; gap: 1.5em; padding: 1.5em; box-sizing: border-box; }
+ a { color: #ccc; text-decoration: none; font-size: 1.6em; padding: 0.5em 1.2em;
+ border: 1px solid #444; border-radius: 0.3em; min-width: 5em;
+ text-align: center; }
+ a:hover { background: #222; color: #fff; border-color: #888; }
+ a.synoptic { border-style: dashed; }
</style>
</head>
<body>
<a href="/sydney/">Sydney</a>
<a href="/brisbane/">Brisbane</a>
+ <a href="/canberra/">Canberra</a>
+ <a href="/cairns/">Cairns</a>
+ <a class="synoptic" href="https://pestrel.com/">Synoptic</a>
</body>
</html>
diff --git a/radar.sydney.html b/radar.sydney.html
index 5c5c69d..db2a216 100644
--- a/radar.sydney.html
+++ b/radar.sydney.html
@@ -2,17 +2,31 @@
<html lang="en">
<head>
<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
<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; }
+ html, body { margin: 0; background: #000; min-height: 100vh; }
+ body { display: flex; flex-direction: column; min-height: 100vh; }
+ nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6em;
+ padding: 0.6em; font-family: sans-serif; }
+ nav a { color: #aaa; text-decoration: none; font-size: 0.95em;
+ padding: 0.35em 0.9em; border: 1px solid #333; border-radius: 0.3em; }
+ nav a:hover { color: #fff; border-color: #777; }
+ nav a.current { color: #fff; border-color: #888; background: #1a1a1a; }
+ main { flex: 1; display: flex; justify-content: center; align-items: center;
+ min-height: 0; }
+ img { width: 100%; max-width: 512px; max-height: 100%; height: auto;
+ display: block; }
</style>
</head>
<body>
- <img src="/idr713-loop.apng" alt="Sydney radar loop">
- <nav><a href="/brisbane/">Brisbane →</a></nav>
+ <nav>
+ <a class="current" href="/sydney/">Sydney</a>
+ <a href="/brisbane/">Brisbane</a>
+ <a href="/canberra/">Canberra</a>
+ <a href="/cairns/">Cairns</a>
+ <a href="https://pestrel.com/">Synoptic</a>
+ </nav>
+ <main><img src="/idr713-loop.apng" alt="Sydney radar loop"></main>
</body>
</html>
diff --git a/setup.sh b/setup.sh
index 89994ae..a9b2fec 100755
--- a/setup.sh
+++ b/setup.sh
@@ -65,6 +65,8 @@ 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
+install -d -o "$OWNER" -g "$OWNER" /srv/www/radar/canberra
+install -d -o "$OWNER" -g "$OWNER" /srv/www/radar/cairns
# ---------------------------------------------------------------------------
# Web content
@@ -74,6 +76,8 @@ install -o "$OWNER" -g "$OWNER" -m 644 "$SCRIPT_DIR/index.html" /srv/www/pestrel
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
+install -o "$OWNER" -g "$OWNER" -m 644 "$SCRIPT_DIR/radar.canberra.html" /srv/www/radar/canberra/index.html
+install -o "$OWNER" -g "$OWNER" -m 644 "$SCRIPT_DIR/radar.cairns.html" /srv/www/radar/cairns/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 0a439fa..eb29938 100644
--- a/systemd/radar-retry.service
+++ b/systemd/radar-retry.service
@@ -7,6 +7,8 @@ User=st33v
WorkingDirectory=/var/lib/radar
ExecStart=-/opt/radar/radarFetch.sh IDR713
ExecStart=-/opt/radar/radarFetch.sh IDR663
+ExecStart=-/opt/radar/radarFetch.sh IDR403
+ExecStart=-/opt/radar/radarFetch.sh IDR193
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 6995637..92852a3 100644
--- a/systemd/radar.service
+++ b/systemd/radar.service
@@ -9,6 +9,8 @@ WorkingDirectory=/var/lib/radar
# `-` prefix: one radar's failure does not skip the next
ExecStart=-/opt/radar/radarFetch.sh IDR713
ExecStart=-/opt/radar/radarFetch.sh IDR663
+ExecStart=-/opt/radar/radarFetch.sh IDR403
+ExecStart=-/opt/radar/radarFetch.sh IDR193
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