diff --git a/sdata/lib/functions.sh b/sdata/lib/functions.sh index bc8f08400..faa608155 100644 --- a/sdata/lib/functions.sh +++ b/sdata/lib/functions.sh @@ -98,7 +98,7 @@ function sudo_init_keepalive(){ # Prompt for sudo password once at the beginning echo -e "${STY_CYAN}[$0]: Requesting sudo privileges for installation...${STY_RST}" - if ! sudo -v; then + if ! sudo true; then echo -e "${STY_RED}[$0]: Failed to obtain sudo privileges. Aborting...${STY_RST}" exit 1 fi @@ -108,7 +108,7 @@ function sudo_init_keepalive(){ ( while true; do sleep 60 - sudo -v 2>/dev/null || exit 0 + sudo true 2>/dev/null || exit 0 done ) & SUDO_KEEPALIVE_PID=$!