feat(spoolman): add installation status

This commit is contained in:
Alessandro Maggi committed 2024-06-08 11:03:53 +02:00
1 parent 333cc5e9bf
commit 1a74fef314
2 files changed
+23

No files matched your search

+22
View File
@@ -183,3 +183,25 @@ function start_install_script() {
fi
}
function get_spoolman_status() {
local -a files
files=(
"${SPOOLMAN_DIR}"
"${SYSTEMD}/Spoolman.service"
)
local count
count=0
for file in "${files[@]}"; do
[[ -e "${file}" ]] && count=$(( count +1 ))
done
if [[ "${count}" -eq "${#files[*]}" ]]; then
echo "Installed"
elif [[ "${count}" -gt 0 ]]; then
echo "Incomplete!"
else
echo "Not installed!"
fi
}
+1
View File
@@ -29,6 +29,7 @@ function main_ui() {
echo -e "| | OctoEverywhere: $(print_status "octoeverywhere")|"
echo -e "| | Mobileraker: $(print_status "mobileraker")|"
echo -e "| | OctoApp: $(print_status "octoapp")|"
echo -e "| | Spoolman: $(print_status "spoolman")|"
echo -e "| | |"
echo -e "| | Octoprint: $(print_status "octoprint")|"
hr