mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 02:54:28 +05:00
fix: correctly add Spoolman to moonraker.asvc (#581)
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -127,9 +127,9 @@ managed_services: Spoolman
|
|||||||
regex="${HOME//\//\\/}\/([A-Za-z0-9_]+)\/moonraker\.asvc"
|
regex="${HOME//\//\\/}\/([A-Za-z0-9_]+)\/moonraker\.asvc"
|
||||||
moonraker_asvc=$(find "${HOME}" -maxdepth 2 -type f -regextype posix-extended -regex "${regex}" | sort)
|
moonraker_asvc=$(find "${HOME}" -maxdepth 2 -type f -regextype posix-extended -regex "${regex}" | sort)
|
||||||
|
|
||||||
if [[ -n ${moonraker_asvc} ]]; then
|
if ! grep -q "^Spoolman$" "${moonraker_asvc}"; then
|
||||||
status_msg "Adding Spoolman service to moonraker.asvc..."
|
status_msg "Adding Spoolman service to moonraker.asvc..."
|
||||||
/bin/sh -c "echo 'Spoolman' >> ${moonraker_asvc}"
|
sed -i '$a''Spoolman' "${moonraker_asvc}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user