From b12c57a16a77668a4ad2632d4694aa315ef1db72 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Tue, 19 Apr 2022 13:58:29 -0300 Subject: [PATCH] Check if dialog is installed in checkForSys...() --- install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 90d6d8f..ef6269f 100755 --- a/install.sh +++ b/install.sh @@ -524,7 +524,10 @@ checkForSystemdUnit() { trapBackup=$(trap) trap 'systemctl stop ${2}; forceExit=true' INT forceExit=false - calcAndRun dialog --infobox "\"\nWaiting for the ${1} to finish. Please wait.\"" 5 WIDTH + command -v dialog &> /dev/null + if [ $? -eq 0 ]; then + calcAndRun dialog --infobox "\"\nWaiting for the ${1} to finish. Please wait.\"" 5 WIDTH + fi if [ "${3}" = "oneshot" ]; then while [ $forceExit = false ]; do result=$(systemctl show -p ActiveState --value "${2}")