forked from Shinonome/dots-hyprland
fix: sudo check
This commit is contained in:
@@ -98,7 +98,7 @@ function sudo_init_keepalive(){
|
|||||||
|
|
||||||
# Prompt for sudo password once at the beginning
|
# Prompt for sudo password once at the beginning
|
||||||
echo -e "${STY_CYAN}[$0]: Requesting sudo privileges for installation...${STY_RST}"
|
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}"
|
echo -e "${STY_RED}[$0]: Failed to obtain sudo privileges. Aborting...${STY_RST}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -108,7 +108,7 @@ function sudo_init_keepalive(){
|
|||||||
(
|
(
|
||||||
while true; do
|
while true; do
|
||||||
sleep 60
|
sleep 60
|
||||||
sudo -v 2>/dev/null || exit 0
|
sudo true 2>/dev/null || exit 0
|
||||||
done
|
done
|
||||||
) &
|
) &
|
||||||
SUDO_KEEPALIVE_PID=$!
|
SUDO_KEEPALIVE_PID=$!
|
||||||
|
|||||||
Reference in New Issue
Block a user