From d9261f9298ec69ee6ed4753bc3ffc9860fdaa981 Mon Sep 17 00:00:00 2001 From: Stephan Wendel Date: Tue, 28 Feb 2023 18:00:36 +0100 Subject: [PATCH] chore: improve performance in crowsnest.sh This should improve search performance to determine install status of crowsnest Signed-off-by: Stephan Wendel --- scripts/crowsnest.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/crowsnest.sh b/scripts/crowsnest.sh index f8ed048..4733a29 100644 --- a/scripts/crowsnest.sh +++ b/scripts/crowsnest.sh @@ -134,15 +134,15 @@ function remove_crowsnest(){ # Status funcs get_crowsnest_status(){ local -a files + local env_file + env_file="$(grep "EnvironmentFile" /etc/systemd/system/crowsnest.service | cut -d "=" -f2)" files=( "${CROWSNEST_DIR}" "/usr/local/bin/crowsnest" "/etc/logrotate.d/crowsnest" "/etc/systemd/system/crowsnest.service" - "$(find "${HOME}" -name 'crowsnest.env' 2> /dev/null || - echo "${HOME}/printer_data/systemd/crowsnest.env")" + "${env_file}" ) - # Contains ugly hackaround for multi instance... :( local count count=0