diff --git a/updates-notifier.sh b/updates-notifier.sh index c03751d..40a4b1b 100755 --- a/updates-notifier.sh +++ b/updates-notifier.sh @@ -5,6 +5,8 @@ PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin # vars gotify readonly TOKEN="" +apt update -qq + #https://askubuntu.com/questions/269606/apt-get-count-the-number-of-updates-available num=`apt-get -q -y --ignore-hold --allow-change-held-packages --allow-unauthenticated -s dist-upgrade | /bin/grep ^Inst | wc -l`; @@ -17,5 +19,5 @@ else updates=$(echo $updates|tr -d '\n') OUT="There are **$num** updates: \r" OUT="${OUT} Packages: *$updates*" - sh ./gotifypush.sh "Kerolap updates notifier" "$OUT" 5 $TOKEN + sh ./gotifypush.sh "Example host updates notifier" "$OUT" 5 $TOKEN fi