From 7399676ce10beddff98c8692f7227b9d40572cfe Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 10 Sep 2018 11:05:11 -0500 Subject: [PATCH] Update glances-install.sh --- glances-install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glances-install.sh b/glances-install.sh index f1020b1..3c595a0 100644 --- a/glances-install.sh +++ b/glances-install.sh @@ -14,11 +14,6 @@ LRed='\033[1;31m' echo -e "${BOrange}Preparinfg to install Glances${Color_Off}" echo "" -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 \ @@ -53,6 +48,11 @@ do_with_root() { fi } +if hash glances 2>/dev/null; then + echo -e "${Green}Uninstalling previous Glances install and dependencies...${Color_Off}" + do_with_root pip uninstall glances[action,batinfo,browser,cpuinfo,chart,docker,export,folders,gpu,ip,raid,snmp,web,wifi] +fi + # Detect distribution name if [[ `which lsb_release 2>/dev/null` ]]; then # lsb_release available