mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-13 18:44:29 +05:00
chore: refactor how moonraker is detected
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
system_check_webui(){
|
||||
### check system for installed moonraker service
|
||||
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
|
||||
if ls /etc/systemd/system/moonraker.service 2>/dev/null || ls /etc/systemd/system | grep -q -E "moonraker-[[:digit:]]+.service"; then
|
||||
moonraker_chk_ok="true"
|
||||
else
|
||||
moonraker_chk_ok="false"
|
||||
fi
|
||||
|
||||
### check system for an installed and enabled octoprint service
|
||||
if systemctl list-unit-files | grep -E "octoprint.*" | grep "enabled" &>/dev/null; then
|
||||
if sudo systemctl list-unit-files | grep -E "octoprint.*" | grep "enabled" &>/dev/null; then
|
||||
OCTOPRINT_ENABLED="true"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user