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