aboutsummaryrefslogtreecommitdiff
path: root/deploy/blind-uploader-watcher.timer
diff options
context:
space:
mode:
authorJason McCormick <jason@mfamily.org>2026-11-05 18:20:34 -0500
committerJason McCormick <jason@mfamily.org>2026-11-05 18:20:34 -0500
commit75719aa37f7317f3a8feeb516f1444edb4274410 (patch)
tree36e7e0454ad0044ebc72a253935790afc389843c /deploy/blind-uploader-watcher.timer
parent67383e6863fcff8b49e680b5b861b3154f8cb518 (diff)
feat: TOML config and upload notification watcher
Replace allowed-uris.txt with config.toml: [GLOBAL] holds SMTP settings (send_as, smtp_server, smtp_port, tls, starttls) and every other stanza is an upload URI with a recipient and optional view_url_prefix. Add watcher.py, run every 5 minutes by a systemd timer, which emails each drop's recipient once per run when new images appeared in the last slot. The email links each image under view_url_prefix and includes its .txt submission details. Fix the service unit and Makefile to use CONFIG_FILE, install the watcher and its units, and validate the config before restarting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'deploy/blind-uploader-watcher.timer')
-rw-r--r--deploy/blind-uploader-watcher.timer12
1 files changed, 12 insertions, 0 deletions
diff --git a/deploy/blind-uploader-watcher.timer b/deploy/blind-uploader-watcher.timer
new file mode 100644
index 0000000..d076334
--- /dev/null
+++ b/deploy/blind-uploader-watcher.timer
@@ -0,0 +1,12 @@
+[Unit]
+Description=Run the Private Drop upload notifier every 5 minutes
+
+[Timer]
+# Fixed wall-clock slots keep consecutive 5-minute scan windows aligned, so an
+# upload is reported once. Keep this in sync with SCAN_INTERVAL_SECONDS.
+OnCalendar=*:0/5
+AccuracySec=1s
+Persistent=false
+
+[Install]
+WantedBy=timers.target