From 376b29b22f0400b98174e70a5ea5b5b0364d66ff 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