mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-13 18:44:29 +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
|
||||
|
||||
### 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
|
||||
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
|
||||
|
||||
### initial moonraker.conf path check
|
||||
|
||||
Reference in New Issue
Block a user