diff --git a/files/moonraker/moonraker.asvc b/files/moonraker/moonraker.asvc index 966f16f..a30e84a 100644 --- a/files/moonraker/moonraker.asvc +++ b/files/moonraker/moonraker.asvc @@ -4,6 +4,7 @@ MoonCord KlipperScreen moonraker-telegram-bot moonraker-obico +octoapp sonar crowsnest octoeverywhere diff --git a/scripts/menu/KE/info_menu_KE.sh b/scripts/menu/KE/info_menu_KE.sh index 297129b..36b1a09 100755 --- a/scripts/menu/KE/info_menu_KE.sh +++ b/scripts/menu/KE/info_menu_KE.sh @@ -48,6 +48,7 @@ function info_menu_ui_ke() { info_line "$(check_folder_ke "$MOONRAKER_OBICO_FOLDER")" 'Obico' info_line "$(check_folder_ke "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion' info_line "$(check_folder_ke "$GUPPYFLO_FOLDER")" 'GuppyFLO' + info_line "$(check_folder_ke "$OCTOAPP_FOLDER")" 'OctoApp Companion' hr subtitle '•CUSTOMIZATION:' info_line "$(check_file_ke "$CREALITY_WEB_FILE")" 'Creality Web Interface' diff --git a/scripts/menu/KE/install_menu_KE.sh b/scripts/menu/KE/install_menu_KE.sh index eb111e9..9280b7a 100755 --- a/scripts/menu/KE/install_menu_KE.sh +++ b/scripts/menu/KE/install_menu_KE.sh @@ -30,6 +30,7 @@ function install_menu_ui_ke() { menu_option '12' 'Install' 'Moonraker Obico' menu_option '13' 'Install' 'Mobileraker Companion' menu_option '14' 'Install' 'GuppyFLO' + menu_option '15' 'Install' 'OctoApp Companion' hr inner_line hr @@ -157,6 +158,18 @@ function install_menu_ke() { else run "install_guppyflo" "install_menu_ui_ke" fi;; + 15) + if [ -d "$OCTOAPP_FOLDER" ]; then + error_msg "OctoApp Companion is already installed!" + elif [ ! -d "$MOONRAKER_FOLDER" ]; then + error_msg "Moonraker and Nginx are needed, please install them first!" + elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then + error_msg "Fluidd or Mainsail is needed, please install it first!" + elif [ ! -f "$ENTWARE_FILE" ]; then + error_msg "Entware is needed, please install it first!" + else + run "install_octoapp" "install_menu_ui_ke" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/menu/KE/remove_menu_KE.sh b/scripts/menu/KE/remove_menu_KE.sh index f25608d..c8f733b 100755 --- a/scripts/menu/KE/remove_menu_KE.sh +++ b/scripts/menu/KE/remove_menu_KE.sh @@ -30,6 +30,7 @@ function remove_menu_ui_ke() { menu_option '12' 'Remove' 'Moonraker Obico' menu_option '13' 'Remove' 'Mobileraker Companion' menu_option '14' 'Remove' 'GuppyFLO' + menu_option '15' 'Remove' 'OctoApp Companion' hr inner_line hr @@ -153,6 +154,12 @@ function remove_menu_ke() { else run "remove_guppyflo" "remove_menu_ui_ke" fi;; + 15) + if [ ! -d "$OCTOAPP_FOLDER" ]; then + error_msg "OctoApp Companion is not installed!" + else + run "remove_octoapp" "remove_menu_ui_ke" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/menu/info_menu.sh b/scripts/menu/info_menu.sh index 2b21b02..7efdff8 100755 --- a/scripts/menu/info_menu.sh +++ b/scripts/menu/info_menu.sh @@ -56,6 +56,7 @@ function info_menu_ui() { info_line "$(check_folder "$MOONRAKER_OBICO_FOLDER")" 'Obico' info_line "$(check_folder "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion' info_line "$(check_folder "$GUPPYFLO_FOLDER")" 'GuppyFLO' + info_line "$(check_folder "$OCTOAPP_FOLDER")" 'OctoApp Companion' hr subtitle '•CUSTOMIZATION:' info_line "$(check_file "$BOOT_DISPLAY_FILE")" 'Custom Boot Display' diff --git a/scripts/menu/install_menu.sh b/scripts/menu/install_menu.sh index 2d7b297..f6e95b9 100755 --- a/scripts/menu/install_menu.sh +++ b/scripts/menu/install_menu.sh @@ -38,6 +38,7 @@ function install_menu_ui() { menu_option '20' 'Install' 'Moonraker Obico' menu_option '21' 'Install' 'Mobileraker Companion' menu_option '22' 'Install' 'GuppyFLO' + menu_option '23' 'Install' 'OctoApp Companion' hr inner_line hr @@ -223,6 +224,18 @@ function install_menu() { else run "install_guppyflo" "install_menu_ui" fi;; + 23) + if [ -d "$OCTOAPP__FOLDER" ]; then + error_msg "OctoApp Companion is already installed!" + elif [ ! -d "$MOONRAKER_FOLDER" ]; then + error_msg "Moonraker and Nginx are needed, please install them first!" + elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then + error_msg "Fluidd or Mainsail is needed, please install it first!" + elif [ ! -f "$ENTWARE_FILE" ]; then + error_msg "Entware is needed, please install it first!" + else + run "install_octoapp" "install_menu_ui" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/menu/remove_menu.sh b/scripts/menu/remove_menu.sh index a52d71e..daae4d8 100755 --- a/scripts/menu/remove_menu.sh +++ b/scripts/menu/remove_menu.sh @@ -38,6 +38,7 @@ function remove_menu_ui() { menu_option '20' 'Remove' 'Moonraker Obico' menu_option '21' 'Remove' 'Mobileraker Companion' menu_option '22' 'Remove' 'GuppyFLO' + menu_option '23' 'Remove' 'OctoApp Companion' hr inner_line hr @@ -215,6 +216,12 @@ function remove_menu() { else run "remove_guppyflo" "remove_menu_ui" fi;; + 19) + if [ ! -d "$OCTOAPP_FOLDER" ]; then + error_msg "OctoApp Companion is not installed!" + else + run "remove_octoapp" "remove_menu_ui" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/octoapp_companion.sh b/scripts/octoapp_companion.sh new file mode 100755 index 0000000..f1f851e --- /dev/null +++ b/scripts/octoapp_companion.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +set -e + +function octoapp_message(){ + top_line + title 'OctoApp Companion' "${yellow}" + inner_line + hr + echo -e " │ ${cyan}Control your Creality printer from your phone and ${white}│" + echo -e " │ ${cyan}get notifications for your print! ${white}│" + hr + bottom_line +} + +function install_octoapp(){ + octoapp_message + local yn + while true; do + install_msg "OctoApp Companion" yn + case "${yn}" in + Y|y) + echo -e "${white}" + if [ -d "$OCTOAPP_FOLDER" ]; then + echo -e "Info: OctoApp Companion is already installed. Download skipped." + else + echo -e "Info: Downloading OctoApp Companion..." + git config --global http.sslVerify false + git clone "$OCTOAPP_URL" "$OCTOAPP_FOLDER" + fi + echo -e "Info: Running OctoApp Companion installer..." + cd "$OCTOAPP_FOLDER" + sh ./install.sh + ok_msg "OctoApp Companion has been installed successfully!" + return;; + N|n) + error_msg "Installation canceled!" + return;; + *) + error_msg "Please select a correct choice!";; + esac + done +} + +function remove_octoapp(){ + octoapp_message + local yn + while true; do + remove_msg "OctoApp Companion" yn + case "${yn}" in + Y|y) + echo -e "${white}" + echo -e "Info: Running OctoApp Companion installer..." + cd "$OCTOAPP_FOLDER" + sh ./uninstall.sh + ok_msg "OctoApp Companion has been removed successfully!" + return;; + N|n) + error_msg "Deletion canceled!" + return;; + *) + error_msg "Please select a correct choice!";; + esac + done +} \ No newline at end of file diff --git a/scripts/paths.sh b/scripts/paths.sh index c3120b7..6d697c4 100755 --- a/scripts/paths.sh +++ b/scripts/paths.sh @@ -161,6 +161,10 @@ function set_paths() { GUPPY_SCREEN_FOLDER="${USR_DATA}/guppyscreen" GUPPY_SCREEN_URL1="${HS_FILES}/guppy-screen/guppy_update.cfg" GUPPY_SCREEN_URL2="${HS_FILES}/guppy-screen/guppy-update.sh" + + # OctoApp Companion # + OCTOAPP_FOLDER="${USR_DATA}/octoapp" + OCTOAPP_URL="https://github.com/crysxd/OctoApp-Plugin.git" # Creality Dynamic Logos for Fluidd # FLUIDD_LOGO_FILE="${USR_DATA}/fluidd/logo_creality_v2.svg"