diff --git a/glances-install.sh b/glances-install.sh index 432e98a..3e9e02b 100644 --- a/glances-install.sh +++ b/glances-install.sh @@ -11,13 +11,16 @@ Red='\033[10;31m' LRed='\033[1;31m' #echo -e "${Green}TEST${Color_Off}" -pip uninstall glances[action,batinfo,browser,cpuinfo,chart,docker,export,folders,gpu,ip,raid,snmp,web,wifi] +if hash glances 2>/dev/null; then + echo -e "${Green}Uninstalling previous Glances install and dependencies...{Color_Off}" + pip uninstall glances[action,batinfo,browser,cpuinfo,chart,docker,export,folders,gpu,ip,raid,snmp,web,wifi] +fi DEPS=$(whiptail --title "iDS-Glances Auto Install Script" --checklist --separate-output \ "\nPlease select which modules to install for Glances to be able\nto utilize for this system:" 28 80 16 \ "action" "Allows Glances to trigger actions on events" ON \ "batinfo" "Displays Battery Stats" OFF \ -"browser" "Allows for other Glances client browsing" OFF \ +"browser" "Allows for other Glances client browsing" ON \ "chart" "Charts Module" ON \ "cloud" "Displays Cloud Stats" OFF \ "cpuinfo" "Display CPU Stats" ON \ @@ -25,7 +28,7 @@ DEPS=$(whiptail --title "iDS-Glances Auto Install Script" --checklist --separate "export" "Allows for Data Export" OFF \ "folders" "Folders Module" ON \ "gpu" "Displays GPU Stats" OFF \ -"ip" "Displays Public and Private Addresses" ON \ +"ip" "Displays Public and Private Addresses" OFF \ "raid" "Displays RAID Stats" OFF \ "snmp" "Could retrieve stats from an snmp endpoint" OFF \ "web" "Allows Glances to run as a webserver" OFF \ @@ -143,6 +146,8 @@ shopt -u nocasematch do_with_root pip install --upgrade pip DEPS2="setuptools glances[$(join_by , $DEPS)]" +echo "" + # Install or ugrade Glances from the Pipy repository if [[ -x /usr/local/bin/glances || -x /usr/bin/glances ]]; then echo -e "${Green}Upgrade Glances and dependancies${Color_Off}" @@ -150,10 +155,10 @@ if [[ -x /usr/local/bin/glances || -x /usr/bin/glances ]]; then do_with_root pip install --upgrade $DEPS2 do_with_root pip install --upgrade glances else - echo -e "${Green}Install dependancies${Color_Off}" + echo -e "${Green}Installing dependancies...${Color_Off}" do_with_root pip install $DEPS2 - - echo -e "${Green}Install Glances${Color_Off}" + echo "" + echo -e "${Green}Installing Glances...${Color_Off}" # Install Glances do_with_root pip install glances fi