diff --git a/install.sh b/install.sh index dca825c..86d3b13 100755 --- a/install.sh +++ b/install.sh @@ -453,12 +453,13 @@ getDotfiles() { } checkForSystemdUnit() { - trap 'systemctl stop ${2}' INT + trap 'systemctl stop ${2}; forceExit=true' INT systemctl is-active --quiet ${2} [ $? -eq 0 ] && return + forceExit=false calcWidthAndRun "whiptail --infobox \"Waiting for the ${1} to finish.\" 7 WIDTH" systemctl is-active --quiet ${2} - while [ $? -ne 0 ]; do + while [ $? -ne 0 ] && [ $forceExit = false ]; do sleep 1 systemctl is-active --quiet ${2} done