initial commit of a bigger kiauh rework to make multi instance installations possible

This commit is contained in:
th33xitus
2021-01-07 15:26:19 +01:00
parent 61dfab5683
commit 08ae57d349
12 changed files with 873 additions and 310 deletions

View File

@@ -18,7 +18,9 @@ klipper_status(){
$KLIPPY_ENV_DIR
)
#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[0]
if [ "$(systemctl list-units --full -all -t service --no-legend | grep -F "klipper.service")" ] || [ "$(systemctl list-units --full -all -t service --no-legend | grep -E "klipper-[[:digit:]].service")" ]; then
unset klipper_data[0]
fi
#count+1 for each found data-item from array
for kd in "${klipper_data[@]}"
do
@@ -64,11 +66,11 @@ moonraker_status(){
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]
if [ "$(systemctl list-units --full -all -t service --no-legend | grep -F "moonraker.service")" ] || [ "$(systemctl list-units --full -all -t service --no-legend | grep -E "moonraker-[[:digit:]].service")" ]; then
unset moonraker_data[0]
fi
#count+1 for each found data-item from array
for mrd in "${moonraker_data[@]}"
do