Update Debian/CPU Governor/setup.sh

Fixed cls with clear.
Added check for powertop, if package does not exist prompt user to install and configure this as an addon to the governor
This commit is contained in:
b.waal 2024-08-11 03:21:02 +02:00
parent 5482bc1aa9
commit 71e43d8421

View File

@ -43,5 +43,19 @@ TERM=ansi whiptail --title "Info" --infobox "Enabling governor at startup..." 7
systemctl start cpu-governor
sleep 1
# Check if package exists
which powertop > /dev/null 2>&1
if [ $? != 0 ]; then
# If package does not exist ask the user to install and configure powertop
if whiptail --title "Info" --yesno "Also install and configure powertop? \n\nPowertop is a tool to enable various powersaving modes." 11 59; then
TERM=ansi whiptail --title "Info" --infobox "Please stand by while this script downloads the next installer" 7 66
sleep 5
#wget next installer from rep
else
TERM=ansi whiptail --title "Info" --msgbox "Setup finished!" 8 19
cls
clear
fi
fi