From 4f7ac68af671380c17898b33b6d7f1b7d44f8663 Mon Sep 17 00:00:00 2001 From: th33xitus Date: Fri, 13 Nov 2020 21:17:17 +0100 Subject: [PATCH] fix: better moonraker service status check --- scripts/status.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/status.sh b/scripts/status.sh index b4cd852..8bec270 100755 --- a/scripts/status.sh +++ b/scripts/status.sh @@ -13,12 +13,12 @@ kiauh_status(){ klipper_status(){ kcount=0 klipper_data=( + SERVICE $KLIPPER_DIR $KLIPPY_ENV_DIR - SERVICE ) #remove the "SERVICE" entry from the klipper_data array if a klipper service is installed - [ "$(systemctl list-units --full -all -t service --no-legend | grep -F "klipper.service")" ] && unset klipper_data[2] + [ "$(systemctl list-units --full -all -t service --no-legend | grep -F "klipper.service")" ] && unset klipper_data[0] #count+1 for each found data-item from array for kd in "${klipper_data[@]}" do @@ -61,13 +61,14 @@ dwc2_status(){ moonraker_status(){ mrcount=0 moonraker_data=( - $MOONRAKER_SERVICE1 - $MOONRAKER_SERVICE2 + SERVICE $MOONRAKER_DIR $MOONRAKER_ENV_DIR $NGINX_CONFD/upstreams.conf $NGINX_CONFD/common_vars.conf ) + #remove the "SERVICE" entry from the moonraker_data array if a moonraker service is installed + [ "$(systemctl list-units --full -all -t service --no-legend | grep -F "moonraker.service")" ] && unset moonraker_data[0] #count+1 for each found data-item from array for mrd in "${moonraker_data[@]}" do