Add flag in checkForSystemdUnit()
This commit is contained in:
parent
6752b96098
commit
0635b2ae5e
|
@ -453,12 +453,13 @@ getDotfiles() {
|
||||||
}
|
}
|
||||||
|
|
||||||
checkForSystemdUnit() {
|
checkForSystemdUnit() {
|
||||||
trap 'systemctl stop ${2}' INT
|
trap 'systemctl stop ${2}; forceExit=true' INT
|
||||||
systemctl is-active --quiet ${2}
|
systemctl is-active --quiet ${2}
|
||||||
[ $? -eq 0 ] && return
|
[ $? -eq 0 ] && return
|
||||||
|
forceExit=false
|
||||||
calcWidthAndRun "whiptail --infobox \"Waiting for the ${1} to finish.\" 7 WIDTH"
|
calcWidthAndRun "whiptail --infobox \"Waiting for the ${1} to finish.\" 7 WIDTH"
|
||||||
systemctl is-active --quiet ${2}
|
systemctl is-active --quiet ${2}
|
||||||
while [ $? -ne 0 ]; do
|
while [ $? -ne 0 ] && [ $forceExit = false ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
systemctl is-active --quiet ${2}
|
systemctl is-active --quiet ${2}
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue