refactor(obico): move dependency handling to obico's own install script #361

Merged
kennethjiang merged 4 commits from master into master 2023-07-10 17:44:05 +02:00
Showing only changes of commit 8cea54ea38 - Show all commits

View File

@@ -85,6 +85,32 @@ function moonraker_obico_setup_dialog() {
moonraker_obico_services=$(moonraker_obico_systemd)
existing_moonraker_obico_count=$(echo "${moonraker_obico_services}" | wc -w )
local allowed_moonraker_obico_count=$(( moonraker_count - existing_moonraker_obico_count ))
# Allow user to reinstall an incomplete installation.
if (( allowed_moonraker_obico_count == 0 && moonraker_count > 0 )); then
local yn
while true; do
echo "${yellow}Obico for Klipper is already installed.${white}"
echo "It is safe to run the install again to repair any issues."
echo ""
local question="Do you want to reinstall Obico for Klipper?"
read -p "${cyan}###### ${question} (Y/n):${white} " yn
case "${yn}" in
Y|y|Yes|yes|"")
select_msg "Yes"
break;;
N|n|No|no)
select_msg "No"
abort_msg "Exiting Obico for Klipper installation...\n"
return;;
*)
error_msg "Invalid Input!";;
esac
done
# The user responded yes, allow the install to run again.
allowed_moonraker_obico_count=1
fi
if (( allowed_moonraker_obico_count > 0 )); then
local new_moonraker_obico_count