From 4b86d4f00487014b0c5e224fe3182f93a25e7b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heath=20Dutton=F0=9F=95=B4=EF=B8=8F?= Date: Wed, 28 Jan 2026 11:58:44 -0500 Subject: [PATCH] Add systemd timer for disconnected reply checks Adds service and timer to run check-disconnected-db-replies on the same schedule as the submission checks. --- ...securedrop-check-disconnected-db-replies.service | 13 +++++++++++++ .../securedrop-check-disconnected-db-replies.timer | 9 +++++++++ 2 files changed, 22 insertions(+) create mode 100644 securedrop/debian/app-code/lib/systemd/system/securedrop-check-disconnected-db-replies.service create mode 100644 securedrop/debian/app-code/lib/systemd/system/securedrop-check-disconnected-db-replies.timer diff --git a/securedrop/debian/app-code/lib/systemd/system/securedrop-check-disconnected-db-replies.service b/securedrop/debian/app-code/lib/systemd/system/securedrop-check-disconnected-db-replies.service new file mode 100644 index 0000000000..099a41a210 --- /dev/null +++ b/securedrop/debian/app-code/lib/systemd/system/securedrop-check-disconnected-db-replies.service @@ -0,0 +1,13 @@ +[Unit] +Description=job to check for disconnected replies in the database + +[Service] +Type=exec +ExecStart=/bin/bash -c "/var/www/securedrop/manage.py check-disconnected-db-replies > /var/lib/securedrop/disconnected_db_replies.txt" +PrivateDevices=yes +PrivateTmp=yes +ProtectSystem=full +ReadOnlyDirectories=/ +ReadWriteDirectories=/var/lib/securedrop +User=www-data +WorkingDirectory=/var/www/securedrop diff --git a/securedrop/debian/app-code/lib/systemd/system/securedrop-check-disconnected-db-replies.timer b/securedrop/debian/app-code/lib/systemd/system/securedrop-check-disconnected-db-replies.timer new file mode 100644 index 0000000000..904dd22a20 --- /dev/null +++ b/securedrop/debian/app-code/lib/systemd/system/securedrop-check-disconnected-db-replies.timer @@ -0,0 +1,9 @@ +[Unit] +Description=check for disconnected replies in the database + +[Timer] +# We want to run this 1 hour before reboot, or 23h after the last reboot +OnBootSec=23h + +[Install] +WantedBy=timers.target