chore: use ls to look for nginx installation

This commit is contained in:
th33xitus
2021-11-11 12:43:13 +01:00
parent 22f705e06c
commit 0284a36e7f

View File

@@ -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