mirror of
https://github.com/jordanhillis/pvekclean.git
synced 2026-06-20 02:15:35 +02:00
Update pvekclean.sh v2.0.2
This commit is contained in:
+6
-2
@@ -421,14 +421,18 @@ pve_kernel_clean() {
|
|||||||
/usr/bin/apt purge -y proxmox-headers-${kernel%-pve} > /dev/null 2>&1
|
/usr/bin/apt purge -y proxmox-headers-${kernel%-pve} > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
printf "DONE!\n"
|
printf "${bold}${green}DONE!${reset}\n"
|
||||||
done
|
done
|
||||||
printf "${bold}[*]${reset} Updating GRUB..."
|
printf "${bold}[*]${reset} Updating GRUB..."
|
||||||
# Update grub after kernels are removed, suppress output
|
# Update grub after kernels are removed, suppress output
|
||||||
if [ "$dry_run" != "true" ]; then
|
if [ "$dry_run" != "true" ]; then
|
||||||
/usr/sbin/update-grub > /dev/null 2>&1
|
/usr/sbin/update-grub > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
printf "DONE!\n"
|
printf "${bold}${green}DONE!${reset}\n"
|
||||||
|
# Get information about the /boot folder
|
||||||
|
boot_info=($(echo $(df -Ph | grep /boot | tail -1) | sed 's/%//g'))
|
||||||
|
# Show information about the /boot
|
||||||
|
printf "${bold}[-]${reset} ${bold}Boot Disk:${reset} ${boot_info[4]}%% full [${boot_info[2]}/${boot_info[1]} used, ${boot_info[3]} free] \n"
|
||||||
# Script finished successfully
|
# Script finished successfully
|
||||||
printf "${bold}[-]${reset} Have a nice $(timeGreeting) ⎦˚◡˚⎣\n"
|
printf "${bold}[-]${reset} Have a nice $(timeGreeting) ⎦˚◡˚⎣\n"
|
||||||
# User wishes to not remove the kernels above, exit
|
# User wishes to not remove the kernels above, exit
|
||||||
|
|||||||
Reference in New Issue
Block a user