From 71e43d8421605b8d62a088010be171ed1de7434f Mon Sep 17 00:00:00 2001 From: "b.waal" Date: Sun, 11 Aug 2024 03:21:02 +0200 Subject: [PATCH] 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 --- Debian/CPU Governor/setup.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Debian/CPU Governor/setup.sh b/Debian/CPU Governor/setup.sh index 58702ae..7f63707 100644 --- a/Debian/CPU Governor/setup.sh +++ b/Debian/CPU Governor/setup.sh @@ -43,5 +43,19 @@ TERM=ansi whiptail --title "Info" --infobox "Enabling governor at startup..." 7 systemctl start cpu-governor sleep 1 -TERM=ansi whiptail --title "Info" --msgbox "Setup finished!" 8 19 -cls \ No newline at end of file + + + +# 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 + clear + fi +fi \ No newline at end of file