feat(spoolman): add installation status
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user