From 2ed7bcf95aa780cbb37ac92fc160be3baddecd02 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Tue, 4 Jan 2022 19:05:15 -0300 Subject: [PATCH] Replace journalctl with systemctl --- install.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 1883f79..edf63b4 100755 --- a/install.sh +++ b/install.sh @@ -447,15 +447,12 @@ getDotfiles() { } checkForSystemdUnits() { - trap 'systemctl stop reflector; forceExit=true' INT - calcHeightAndRun "whiptail --infobox \"Waiting for systemd units to finish ('reflector.service'). This may take a while, please wait.\" HEIGTH 61" - journalctl --sync - result=$(journalctl -b -q -r -g "Graphical" | wc -l) - forceExit=false - while [ $result -lt 2 ] && [ $forceExit = false ]; do + trap 'systemctl stop reflector' INT + calcHeightAndRun "whiptail --infobox \"Waiting for systemd units to finish. In particular 'reflector.service' is the one that will take the longest. If you want to stop it, type Ctrl+C (note that the script will ask you later if you want to update the mirrors, so don't worry).\" HEIGTH 61" + systemctl is-active --quiet graphical.target + while [ $? -ne 0 ]; do sleep 1 - journalctl --sync - result=$(journalctl -b -q -r -g "Graphical" | wc -l) + systemctl is-active --quiet graphical.target done trap - INT }