From 31ebfb3a8a12b55e5309e1861982457eb20d2730 Mon Sep 17 00:00:00 2001 From: Benjamin Slade Date: Wed, 20 May 2020 17:07:19 -0600 Subject: [PATCH] make systemctl check quieter - don't output path to systemctl to stout --- util/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/functions.sh b/util/functions.sh index 1509682..33fad3f 100755 --- a/util/functions.sh +++ b/util/functions.sh @@ -59,7 +59,7 @@ warn_not_root() { } poweroff() { - if command -v systemctl 2>/dev/null; then + if [ "$(command -v systemctl 2>/dev/null 2>&1)" ]; then systemctl poweroff else shutdown -P now