mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 02:54:28 +05:00
chore: refactor how klipper services are count
This commit is contained in:
@@ -45,10 +45,10 @@ moonraker_setup_dialog(){
|
|||||||
shopt -u extglob # disable extended globbing
|
shopt -u extglob # disable extended globbing
|
||||||
|
|
||||||
### count amount of klipper services
|
### count amount of klipper services
|
||||||
if [ "$(systemctl list-units --full -all -t service --no-legend | grep -F "klipper.service")" ]; then
|
if ls /etc/systemd/system/klipper.service 2>/dev/null; then
|
||||||
INSTANCE_COUNT=1
|
INSTANCE_COUNT=1
|
||||||
else
|
else
|
||||||
INSTANCE_COUNT=$(systemctl list-units --full -all -t service --no-legend | grep -E "klipper-[[:digit:]]+.service" | wc -l)
|
INSTANCE_COUNT=$(ls /etc/systemd/system | grep -E "klipper-[[:digit:]]+.service" | wc -l)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### initial moonraker.conf path check
|
### initial moonraker.conf path check
|
||||||
|
|||||||
Reference in New Issue
Block a user