# HG changeset patch # User IBBoard # Date 1692534490 -3600 # Node ID a32771c91043e727f46ded1fcb048b8661382d5e # Parent d0e7979c7e8ca58632455153ed5d387696f03768 Switch updates available/restart required to script This lets the script manage whether it's on Ubuntu or CentOS and whether it needs yum commands or apt. diff -r d0e7979c7e8c -r a32771c91043 manifests/templates.pp --- a/manifests/templates.pp Sun Aug 13 15:26:37 2023 +0100 +++ b/manifests/templates.pp Sun Aug 20 13:28:10 2023 +0100 @@ -1095,14 +1095,17 @@ } # Notify of available updates cron { 'check-yum-updates': - command => '/usr/bin/yum check-update | grep -E "^[^ ]+ +[0-9a-z:_\.-]+ +[^ ]+\s*\$"', + ensure => absent, + } + cron { 'check-for-updates': + command => '/usr/local/bin/check-updates', hour => '4', minute => '30', weekday => '0-6/3', #Sunday, Wednesday and Saturday morning } # And check whether anything needs restarting cron { 'check-needs-restarting': - command => '/usr/bin/needs-restarting|grep -v "/usr/lib/systemd\|/usr/sbin/lvmetad\|/usr/lib/polkit-1/polkitd"', + command => '/usr/local/bin/needs-restarting', hour => '4', minute => '45', weekday => '0-6/3', #Sunday, Wednesday and Saturday morning