Check if dialog is installed in checkForSys...()
This commit is contained in:
parent
e0341b8c6c
commit
b12c57a16a
|
@ -524,7 +524,10 @@ checkForSystemdUnit() {
|
||||||
trapBackup=$(trap)
|
trapBackup=$(trap)
|
||||||
trap 'systemctl stop ${2}; forceExit=true' INT
|
trap 'systemctl stop ${2}; forceExit=true' INT
|
||||||
forceExit=false
|
forceExit=false
|
||||||
|
command -v dialog &> /dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
calcAndRun dialog --infobox "\"\nWaiting for the ${1} to finish. Please wait.\"" 5 WIDTH
|
calcAndRun dialog --infobox "\"\nWaiting for the ${1} to finish. Please wait.\"" 5 WIDTH
|
||||||
|
fi
|
||||||
if [ "${3}" = "oneshot" ]; then
|
if [ "${3}" = "oneshot" ]; then
|
||||||
while [ $forceExit = false ]; do
|
while [ $forceExit = false ]; do
|
||||||
result=$(systemctl show -p ActiveState --value "${2}")
|
result=$(systemctl show -p ActiveState --value "${2}")
|
||||||
|
|
Loading…
Reference in New Issue