Only run checkupdates when there are updates available
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9c9dfee661
commit
2b0d441c35
1 changed files with 1 additions and 1 deletions
|
@ -68,11 +68,11 @@ source_config "$HOME/.check_updates.conf" "/etc/check_updates.conf"
|
|||
apply_defaults
|
||||
check_required
|
||||
|
||||
CHECK_UPDATES_UPDATES=$(eval "${CHECK_UPDATES_UPDATES_CMD}")
|
||||
CHECK_UPDATES_UPDATES_AMOUNT=$(eval "${CHECK_UPDATES_UPDATES_AMOUNT_CMD}")
|
||||
HOSTNAME=$(hostname)
|
||||
|
||||
if [[ "$CHECK_UPDATES_UPDATES_AMOUNT" -gt "0" ]]; then
|
||||
CHECK_UPDATES_UPDATES=$(eval "${CHECK_UPDATES_UPDATES_CMD}")
|
||||
SUBJECT="[updates ${HOSTNAME}]"
|
||||
MESSAGE=$(cat <<EOF
|
||||
There are ${CHECK_UPDATES_UPDATES_AMOUNT} updates available on ${HOSTNAME}.
|
||||
|
|
Loading…
Reference in a new issue