Reboot prompt for updates
Experimenting with swanag stuff. Check if reboot is required, nag to reboot, include installed packages in details.
This commit is contained in:
parent
dcbb22bf8a
commit
8c1eddbf83
|
@ -23,6 +23,9 @@ elif [ "$1" == 'upgrade' ]; then
|
||||||
COUNT=`apt list --upgradable 2> /dev/null | wc -l`
|
COUNT=`apt list --upgradable 2> /dev/null | wc -l`
|
||||||
let COUNT--
|
let COUNT--
|
||||||
echo $COUNT > /home/jpm/.spool/apt-upgradeable
|
echo $COUNT > /home/jpm/.spool/apt-upgradeable
|
||||||
|
if [ -e /var/run/reboot-required ]; then
|
||||||
|
cat /var/log/apt/history.log | tr "\n" "%" | sed -e 's/.*\(Start-Date\)/\1/g' | tr "%" "\n" | swaynag --config=${HOME}/.dotfiles/sway/swaynag --edge=bottom --message="New packages require restart" --button="Restart Now" "sudo systemctl reboot" --dismiss-button="Later" --detailed-message --detailed-button "Show/Hide Upgrade Details"
|
||||||
|
fi
|
||||||
elif [ "$1" == 'update' ]; then
|
elif [ "$1" == 'update' ]; then
|
||||||
sudo apt update >/dev/null 2>/dev/null
|
sudo apt update >/dev/null 2>/dev/null
|
||||||
COUNT=`apt list --upgradable 2> /dev/null | wc -l`
|
COUNT=`apt list --upgradable 2> /dev/null | wc -l`
|
||||||
|
|
Loading…
Reference in New Issue