From: Ian Kelling Date: Fri, 4 Mar 2022 02:52:48 +0000 (-0500) Subject: tune cronjobs X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=2b981100a8b45f117d6f5c165404937f3c917e8f;p=distro-setup tune cronjobs --- diff --git a/brc2 b/brc2 index 9fa1010..5cd83b2 100644 --- a/brc2 +++ b/brc2 @@ -1481,6 +1481,29 @@ runsieve() { sed -r '/^info: filtering:/{h;d};/^info: msgid=$/N;/^info: msgid=.*left message in mailbox [^ ]+$/d;/^info: msgid=/{H;g};/^info: message kept in source mailbox.$/d' /tmp/testsieve.log } +# usage: +# alertme SUBJECT +# printf "subject\nbody\n" | alertme +alertme() { + if [[ -t 0 ]]; then + exim -t <&2; } hn=$(hostname -f) source /a/bin/bash_unpublished/source-state +d() { + if [[ $DEBUG ]]; then + pee cat "wall -n" + else + echo ok | sed 's/^/myupgrade /' | pee logger "wall -n" + fi +} myreboot() { for x in {30..1}; do echo "pid $$. unattended upgrade, rebooting in $((x*10)) seconds" | wall -n @@ -26,7 +35,7 @@ myreboot() { done for x in {30..1}; do if ! fuser /var/lib/dpkg/lock &> /dev/null; then - echo "pid $$. unattended upgrade, rebooting now" | pee cat "wall -n" + echo "pid $$. unattended upgrade, rebooting now" | d /a/bin/ds/keyscript-on /sbin/reboot exit 0 @@ -34,7 +43,7 @@ myreboot() { echo "pid $$. unattended upgrade reboot waiting 10 seconds for dpkg lock" | wall -n sleep 10 done - echo "pid $$. dpkg locked for 5 minutes, automatic reboot failed" | pee cat "wall -n" + echo "pid $$. dpkg locked for 5 minutes, automatic reboot failed" | d } diff --git a/machine_specific/kd/filesystem/etc/systemd/system/btrbkrust.timer b/machine_specific/kd/filesystem/etc/systemd/system/btrbkrust.timer index 8866acc..4e73b09 100644 --- a/machine_specific/kd/filesystem/etc/systemd/system/btrbkrust.timer +++ b/machine_specific/kd/filesystem/etc/systemd/system/btrbkrust.timer @@ -2,7 +2,7 @@ Description=Btrbk rust timer [Timer] -OnCalendar=*-*-* 05:00:00 +OnCalendar=*-*-* 05:00:00 America/New_York [Install] WantedBy=timers.target