From 0284a36e7f5a427af3f7b803bcb9673e9bf95b3d Mon Sep 17 00:00:00 2001 From: th33xitus Date: Thu, 11 Nov 2021 12:43:13 +0100 Subject: [PATCH] chore: use `ls` to look for nginx installation --- scripts/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index d4fa030..e4dcb9b 100755 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -225,7 +225,7 @@ restart_MoonrakerTelegramBot(){ } restart_nginx(){ - if [ "$(systemctl list-units --full -all -t service --no-legend | grep -F "nginx.service")" ]; then + if ls /lib/systemd/system/nginx.service 2>/dev/null 1>&2; then status_msg "Restarting NGINX Service ..." sudo systemctl restart nginx && ok_msg "NGINX Service restarted!" fi