bundles/cron: use MAILTO=, rework metadata syntax

This commit is contained in:
Franzi 2022-02-05 11:41:41 +01:00
parent 533f8075ca
commit 0d865c93d4
Signed by: kunsi
GPG key ID: 12E3D2136B818350
22 changed files with 113 additions and 65 deletions

View file

@ -21,8 +21,6 @@ case "$exitcode" in
echo "Upgrades skipped due to active SSH login"
exit 1
;;
reboot)
;;
0)
if [[ -f /var/run/reboot-required ]]
then

View file

@ -18,7 +18,7 @@ defaults = {
@metadata_reactor.provides(
'cron/upgrade-and-reboot'
'cron/jobs/upgrade-and-reboot'
)
def patchday(metadata):
day = metadata.get('apt/unattended-upgrades/day')
@ -26,10 +26,12 @@ def patchday(metadata):
return {
'cron': {
'upgrade-and-reboot': '{minute} {hour} * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
minute=node.magic_number % 30,
hour=hour,
day=day,
),
'jobs': {
'upgrade-and-reboot': '{minute} {hour} * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
minute=node.magic_number % 30,
hour=hour,
day=day,
),
},
},
}