petite gâterie ![]()
Pour avoir la liste des paquets pouvant être mis à jour dans le mail, jai modifié la partie update package lists
# update package lists
UPDATED=0
UPDATE_STAMP=/var/lib/apt/periodic/update-stamp
if check_stamp $UPDATE_STAMP $UpdateInterval; then
if eval apt-get $XAPTOPT -y update $XSTDERR; then
debug_echo "download updated metadata (success)."
if which dbus-send >/dev/null 2>&1 && pidof dbus-daemon >/dev/null 2>&1; then
if dbus-send --system / app.apt.dbus.updated boolean:true ; then
debug_echo "send dbus signal (success)"
else
debug_echo "send dbus signal (error)"
fi
else
debug_echo "dbus signal not send (command not available)"
fi
update_stamp $UPDATE_STAMP
UPDATED=1
echo '*************************************' >> "/tmp/resul-apt-daily.txt"
apt list --upgradable >> "/tmp/resul-apt-daily.txt"
echo '*************************************' >> "/tmp/resul-apt-daily.txt"
else
debug_echo "download updated metadata (error)"
fi
else
debug_echo "download updated metadata (not run)."
fi
