From 4989bfbab34e7d66f2c1c42958497e464c02b553 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Thu, 6 Jan 2022 11:39:37 -0300 Subject: [PATCH] Update checkForSystemdUnit() --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index d6799c0..898089b 100755 --- a/install.sh +++ b/install.sh @@ -484,6 +484,11 @@ getDotfiles() { checkForSystemdUnit() { trap 'systemctl stop ${2}; forceExit=true' INT + if [ "${3}" = "oneshot" ]; then + [ "$(systemctl show -p ActiveState --value ${2})" = "inactive" ] && return + else + systemctl is-active --quiet ${2} && return + fi forceExit=false calcWidthAndRun "whiptail --infobox \"Waiting for the ${1} to finish. Please wait.\" 7 WIDTH" if [ "${3}" = "oneshot" ]; then