mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-13 02:24:27 +05:00
refactor(crowsnest): improve performance in crowsnest.sh (#306)
This commit is contained in:
@@ -134,15 +134,15 @@ function remove_crowsnest(){
|
|||||||
# Status funcs
|
# Status funcs
|
||||||
get_crowsnest_status(){
|
get_crowsnest_status(){
|
||||||
local -a files
|
local -a files
|
||||||
|
local env_file
|
||||||
|
env_file="$(grep "EnvironmentFile" /etc/systemd/system/crowsnest.service | cut -d "=" -f2)"
|
||||||
files=(
|
files=(
|
||||||
"${CROWSNEST_DIR}"
|
"${CROWSNEST_DIR}"
|
||||||
"/usr/local/bin/crowsnest"
|
"/usr/local/bin/crowsnest"
|
||||||
"/etc/logrotate.d/crowsnest"
|
"/etc/logrotate.d/crowsnest"
|
||||||
"/etc/systemd/system/crowsnest.service"
|
"/etc/systemd/system/crowsnest.service"
|
||||||
"$(find "${HOME}" -name 'crowsnest.env' 2> /dev/null ||
|
"${env_file}"
|
||||||
echo "${HOME}/printer_data/systemd/crowsnest.env")"
|
|
||||||
)
|
)
|
||||||
# Contains ugly hackaround for multi instance... :(
|
|
||||||
local count
|
local count
|
||||||
count=0
|
count=0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user