#!/bin/bash

## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

source /usr/libexec/helper-scripts/light_sleep.bsh

## sets: systemd_notify
source /usr/libexec/helper-scripts/systemd-notify.bsh

"${systemd_notify[@]}" --pid="$$" --ready

while true; do
   echo "$0: INFO: start."
   "${systemd_notify[@]}" --pid="$$" WATCHDOG=1

   /usr/libexec/systemcheck/canary

   "${systemd_notify[@]}" --pid="$$" WATCHDOG=1
   echo "$0: INFO: end."

   ## 1 hour
   light_sleep 3600
done
