First commit
This commit is contained in:
commit
7693c29676
102 changed files with 11831 additions and 0 deletions
87
scripts/menu/KE/customize_menu_KE.sh
Executable file
87
scripts/menu/KE/customize_menu_KE.sh
Executable file
|
@ -0,0 +1,87 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
function customize_menu_ui_ke() {
|
||||
top_line
|
||||
title '[ CUSTOMIZE MENU ]' "${yellow}"
|
||||
inner_line
|
||||
hr
|
||||
menu_option '1' 'Remove' 'Creality Web Interface'
|
||||
menu_option '2' 'Restore' 'Creality Web Interface'
|
||||
hr
|
||||
menu_option '3' 'Install' 'Guppy Screen'
|
||||
menu_option '4' 'Remove' 'Guppy Screen'
|
||||
hr
|
||||
menu_option '5' 'Install' 'Creality Dynamic Logos for Fluidd'
|
||||
hr
|
||||
inner_line
|
||||
hr
|
||||
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
|
||||
bottom_menu_option 'q' 'Exit' "${darkred}"
|
||||
hr
|
||||
version_line "$(get_script_version)"
|
||||
bottom_line
|
||||
}
|
||||
|
||||
function customize_menu_ke() {
|
||||
clear
|
||||
customize_menu_ui_ke
|
||||
local customize_menu_opt
|
||||
while true; do
|
||||
read -p " ${white}Type your choice and validate with Enter: ${yellow}" customize_menu_opt
|
||||
case "${customize_menu_opt}" in
|
||||
1)
|
||||
if [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then
|
||||
error_msg "Fluidd or Mainsail is needed, please install it first!"
|
||||
elif [ ! -f "$CREALITY_WEB_FILE" ]; then
|
||||
error_msg "Creality Web Interface is already removed!"
|
||||
echo -e " ${darkred}Please restore Creality Web Interface first if you want to change the default Web Interface.${white}"
|
||||
echo
|
||||
else
|
||||
run "remove_creality_web_interface" "customize_menu_ui_ke"
|
||||
fi;;
|
||||
2)
|
||||
if [ -f "$CREALITY_WEB_FILE" ]; then
|
||||
error_msg "Creality Web Interface is already present!"
|
||||
else
|
||||
run "restore_creality_web_interface" "customize_menu_ui_ke"
|
||||
fi;;
|
||||
3)
|
||||
if [ -d "$GUPPY_SCREEN_FOLDER" ]; then
|
||||
error_msg "Guppy Screen is already installed!"
|
||||
echo -e " ${darkred}Please remove Guppy Screen first if you want to change the theme.${white}"
|
||||
echo
|
||||
elif [ -d "$IMP_SHAPERS_FOLDER" ]; then
|
||||
error_msg "Please remove Improved Shapers Calibrations first, Guppy Screen already use it!"
|
||||
elif [ ! -f /lib/ld-2.29.so ]; then
|
||||
error_msg "Make sure you're running 1.3.x.x firmware version!"
|
||||
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
|
||||
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
|
||||
else
|
||||
run "install_guppy_screen" "customize_menu_ui_ke"
|
||||
fi;;
|
||||
4)
|
||||
if [ ! -d "$GUPPY_SCREEN_FOLDER" ]; then
|
||||
error_msg "Guppy Screen is not installed!"
|
||||
else
|
||||
run "remove_guppy_screen" "customize_menu_ui_ke"
|
||||
fi;;
|
||||
5)
|
||||
if [ -f "$FLUIDD_LOGO_FILE" ]; then
|
||||
error_msg "Creality Dynamic Logos for Fluidd are already installed!"
|
||||
elif [ ! -d "$FLUIDD_FOLDER" ]; then
|
||||
error_msg "Fluidd is needed, please install it first!"
|
||||
else
|
||||
run "install_creality_dynamic_logos" "customize_menu_ui_ke"
|
||||
fi;;
|
||||
B|b)
|
||||
clear; main_menu; break;;
|
||||
Q|q)
|
||||
clear; exit 0;;
|
||||
*)
|
||||
error_msg "Please select a correct choice!";;
|
||||
esac
|
||||
done
|
||||
customize_menu_ke
|
||||
}
|
81
scripts/menu/KE/info_menu_KE.sh
Executable file
81
scripts/menu/KE/info_menu_KE.sh
Executable file
|
@ -0,0 +1,81 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
function check_folder_ke() {
|
||||
local folder_path="$1"
|
||||
if [ -d "$folder_path" ]; then
|
||||
echo -e "${green}✓"
|
||||
else
|
||||
echo -e "${red}✗"
|
||||
fi
|
||||
}
|
||||
|
||||
function check_file_ke() {
|
||||
local file_path="$1"
|
||||
if [ -f "$file_path" ]; then
|
||||
echo -e "${green}✓"
|
||||
else
|
||||
echo -e "${red}✗"
|
||||
fi
|
||||
}
|
||||
|
||||
function info_menu_ui_ke() {
|
||||
top_line
|
||||
title '[ INFORMATIONS MENU ]' "${yellow}"
|
||||
inner_line
|
||||
hr
|
||||
subtitle '•ESSENTIALS:'
|
||||
info_line "$(check_folder_ke "$MOONRAKER_FOLDER")" 'Moonraker & Nginx'
|
||||
info_line "$(check_folder_ke "$FLUIDD_FOLDER")" 'Fluidd'
|
||||
info_line "$(check_folder_ke "$MAINSAIL_FOLDER")" 'Mainsail'
|
||||
hr
|
||||
subtitle '•UTILITIES:'
|
||||
info_line "$(check_file_ke "$ENTWARE_FILE")" 'Entware'
|
||||
info_line "$(check_file_ke "$KLIPPER_SHELL_FILE")" 'Klipper Gcode Shell Command'
|
||||
hr
|
||||
subtitle '•IMPROVEMENTS:'
|
||||
info_line "$(check_folder_ke "$IMP_SHAPERS_FOLDER")" 'Improved Shapers Calibrations'
|
||||
info_line "$(check_file_ke "$SAVE_ZOFFSET_FILE")" 'Save Z-Offset Macros'
|
||||
info_line "$(check_file_ke "$VIRTUAL_PINS_FILE")" 'Virtual Pins Support'
|
||||
info_line "$(check_file_ke "$GIT_BACKUP_FILE")" 'Git Backup'
|
||||
hr
|
||||
subtitle '•CAMERA:'
|
||||
info_line "$(check_file_ke "$TIMELAPSE_FILE")" 'Moonraker Timelapse'
|
||||
hr
|
||||
subtitle '•REMOTE ACCESS AND AI DETECTION:'
|
||||
info_line "$(check_folder_ke "$OCTOEVERYWHERE_FOLDER")" 'OctoEverywhere'
|
||||
info_line "$(check_folder_ke "$MOONRAKER_OBICO_FOLDER")" 'Obico'
|
||||
info_line "$(check_folder_ke "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion'
|
||||
hr
|
||||
subtitle '•CUSTOMIZATION:'
|
||||
info_line "$(check_file_ke "$CREALITY_WEB_FILE")" 'Creality Web Interface'
|
||||
info_line "$(check_folder_ke "$GUPPY_SCREEN_FOLDER")" 'Guppy Screen'
|
||||
info_line "$(check_file_ke "$FLUIDD_LOGO_FILE")" 'Creality Dynamic Logos for Fluidd'
|
||||
hr
|
||||
inner_line
|
||||
hr
|
||||
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
|
||||
bottom_menu_option 'q' 'Exit' "${darkred}"
|
||||
hr
|
||||
version_line "$(get_script_version)"
|
||||
bottom_line
|
||||
}
|
||||
|
||||
function info_menu_ke() {
|
||||
clear
|
||||
info_menu_ui_ke
|
||||
local info_menu_opt
|
||||
while true; do
|
||||
read -p " ${white}Type your choice and validate with Enter: ${yellow}" info_menu_opt
|
||||
case "${info_menu_opt}" in
|
||||
B|b)
|
||||
clear; main_menu; break;;
|
||||
Q|q)
|
||||
clear; exit 0;;
|
||||
*)
|
||||
error_msg "Please select a correct choice!";;
|
||||
esac
|
||||
done
|
||||
info_menu_ke
|
||||
}
|
162
scripts/menu/KE/install_menu_KE.sh
Executable file
162
scripts/menu/KE/install_menu_KE.sh
Executable file
|
@ -0,0 +1,162 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
function install_menu_ui_ke() {
|
||||
top_line
|
||||
title '[ INSTALL MENU ]' "${yellow}"
|
||||
inner_line
|
||||
hr
|
||||
subtitle '•ESSENTIALS:'
|
||||
menu_option ' 1' 'Install' 'Moonraker and Nginx'
|
||||
menu_option ' 2' 'Install' 'Fluidd (port 4408)'
|
||||
menu_option ' 3' 'Install' 'Mainsail (port 4409)'
|
||||
hr
|
||||
subtitle '•UTILITIES:'
|
||||
menu_option ' 4' 'Install' 'Entware'
|
||||
menu_option ' 5' 'Install' 'Klipper Gcode Shell Command'
|
||||
hr
|
||||
subtitle '•IMPROVEMENTS:'
|
||||
menu_option ' 6' 'Install' 'Improved Shapers Calibrations'
|
||||
menu_option ' 7' 'Install' 'Save Z-Offset Macros'
|
||||
menu_option ' 8' 'Install' 'Virtual Pins Support'
|
||||
menu_option ' 9' 'Install' 'Git Backup'
|
||||
hr
|
||||
subtitle '•CAMERA:'
|
||||
menu_option '10' 'Install' 'Moonraker Timelapse'
|
||||
hr
|
||||
subtitle '•REMOTE ACCESS AND AI DETECTION:'
|
||||
menu_option '11' 'Install' 'OctoEverywhere'
|
||||
menu_option '12' 'Install' 'Moonraker Obico'
|
||||
menu_option '13' 'Install' 'Mobileraker Companion'
|
||||
hr
|
||||
inner_line
|
||||
hr
|
||||
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
|
||||
bottom_menu_option 'q' 'Exit' "${darkred}"
|
||||
hr
|
||||
version_line "$(get_script_version)"
|
||||
bottom_line
|
||||
}
|
||||
|
||||
function install_menu_ke() {
|
||||
clear
|
||||
install_menu_ui_ke
|
||||
local install_menu_opt
|
||||
while true; do
|
||||
read -p " ${white}Type your choice and validate with Enter: ${yellow}" install_menu_opt
|
||||
case "${install_menu_opt}" in
|
||||
1)
|
||||
if [ -d "$MOONRAKER_FOLDER" ]; then
|
||||
error_msg "Moonraker and Nginx are already installed!"
|
||||
else
|
||||
run "install_moonraker_nginx" "install_menu_ui_ke"
|
||||
fi;;
|
||||
2)
|
||||
if [ -d "$FLUIDD_FOLDER" ]; then
|
||||
error_msg "Fluidd is already installed!"
|
||||
elif [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then
|
||||
error_msg "Moonraker and Nginx are needed, please install them first!"
|
||||
else
|
||||
run "install_fluidd" "install_menu_ui_ke"
|
||||
fi;;
|
||||
3)
|
||||
if [ -d "$MAINSAIL_FOLDER" ]; then
|
||||
error_msg "Mainsail is already installed!"
|
||||
elif [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then
|
||||
error_msg "Moonraker and Nginx are needed, please install them first!"
|
||||
else
|
||||
run "install_mainsail" "install_menu_ui_ke"
|
||||
fi;;
|
||||
4)
|
||||
if [ -f "$ENTWARE_FILE" ]; then
|
||||
error_msg "Entware is already installed!"
|
||||
else
|
||||
run "install_entware" "install_menu_ui_ke"
|
||||
fi;;
|
||||
5)
|
||||
if [ -f "$KLIPPER_SHELL_FILE" ]; then
|
||||
error_msg "Klipper Gcode Shell Command is already installed!"
|
||||
else
|
||||
run "install_gcode_shell_command" "install_menu_ui_ke"
|
||||
fi;;
|
||||
6)
|
||||
if [ -d "$IMP_SHAPERS_FOLDER" ]; then
|
||||
error_msg "Improved Shapers Calibrations are already installed!"
|
||||
elif [ -d "$GUPPY_SCREEN_FOLDER" ]; then
|
||||
error_msg "Guppy Screen already has these features!"
|
||||
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
|
||||
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
|
||||
else
|
||||
run "install_improved_shapers" "install_menu_ui_ke"
|
||||
fi;;
|
||||
7)
|
||||
if [ -f "$SAVE_ZOFFSET_FILE" ]; then
|
||||
error_msg "Save Z-Offset Macros are already installed!"
|
||||
else
|
||||
run "install_save_zoffset_macros" "install_menu_ui_ke"
|
||||
fi;;
|
||||
8)
|
||||
if [ -f "$VIRTUAL_PINS_FILE" ]; then
|
||||
error_msg "Virtual Pins Support is already installed!"
|
||||
else
|
||||
run "install_virtual_pins" "install_menu_ui_ke"
|
||||
fi;;
|
||||
9)
|
||||
if [ -f "$GIT_BACKUP_FILE" ]; then
|
||||
error_msg "Git Backup is already installed!"
|
||||
elif [ ! -f "$ENTWARE_FILE" ]; then
|
||||
error_msg "Entware is needed, please install it first!"
|
||||
elif [ ! -f "$KLIPPER_SHELL_FILE" ]; then
|
||||
error_msg "Klipper Gcode Shell Command is needed, please install it first!"
|
||||
else
|
||||
run "install_git_backup" "install_menu_ui_ke"
|
||||
fi;;
|
||||
10)
|
||||
if [ -f "$TIMELAPSE_FILE" ]; then
|
||||
error_msg "Moonraker Timelapse is already installed!"
|
||||
elif [ ! -f "$ENTWARE_FILE" ]; then
|
||||
error_msg "Entware is needed, please install it first!"
|
||||
else
|
||||
run "install_moonraker_timelapse" "install_menu_ui_ke"
|
||||
fi;;
|
||||
11)
|
||||
if [ -d "$OCTOEVERYWHERE_FOLDER" ]; then
|
||||
error_msg "OctoEverywhere 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_octoeverywhere" "install_menu_ui_ke"
|
||||
fi;;
|
||||
12)
|
||||
if [ -d "$MOONRAKER_OBICO_FOLDER" ]; then
|
||||
error_msg "Moonraker Obico 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_moonraker_obico" "install_menu_ui_ke"
|
||||
fi;;
|
||||
13)
|
||||
if [ -d "$MOBILERAKER_COMPANION_FOLDER" ]; then
|
||||
error_msg "Mobileraker Companion is already installed!"
|
||||
else
|
||||
run "install_mobileraker_companion" "install_menu_ui_ke"
|
||||
fi;;
|
||||
B|b)
|
||||
clear; main_menu; break;;
|
||||
Q|q)
|
||||
clear; exit 0;;
|
||||
*)
|
||||
error_msg "Please select a correct choice!";;
|
||||
esac
|
||||
done
|
||||
install_menu_ke
|
||||
}
|
158
scripts/menu/KE/remove_menu_KE.sh
Executable file
158
scripts/menu/KE/remove_menu_KE.sh
Executable file
|
@ -0,0 +1,158 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
function remove_menu_ui_ke() {
|
||||
top_line
|
||||
title '[ REMOVE MENU ]' "${yellow}"
|
||||
inner_line
|
||||
hr
|
||||
subtitle '•ESSENTIALS:'
|
||||
menu_option ' 1' 'Remove' 'Moonraker and Nginx'
|
||||
menu_option ' 2' 'Remove' 'Fluidd (port 4408)'
|
||||
menu_option ' 3' 'Remove' 'Mainsail (port 4409)'
|
||||
hr
|
||||
subtitle '•UTILITIES:'
|
||||
menu_option ' 4' 'Remove' 'Entware'
|
||||
menu_option ' 5' 'Remove' 'Klipper Gcode Shell Command'
|
||||
hr
|
||||
subtitle '•IMPROVEMENTS:'
|
||||
menu_option ' 6' 'Remove' 'Improved Shapers Calibrations'
|
||||
menu_option ' 7' 'Remove' 'Save Z-Offset Macros'
|
||||
menu_option ' 8' 'Remove' 'Virtual Pins Support'
|
||||
menu_option ' 9' 'Remove' 'Git Backup'
|
||||
hr
|
||||
subtitle '•CAMERA:'
|
||||
menu_option '10' 'Remove' 'Moonraker Timelapse'
|
||||
hr
|
||||
subtitle '•REMOTE ACCESS AND AI DETECTION:'
|
||||
menu_option '11' 'Remove' 'OctoEverywhere'
|
||||
menu_option '12' 'Remove' 'Moonraker Obico'
|
||||
menu_option '13' 'Remove' 'Mobileraker Companion'
|
||||
hr
|
||||
inner_line
|
||||
hr
|
||||
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
|
||||
bottom_menu_option 'q' 'Exit' "${darkred}"
|
||||
hr
|
||||
version_line "$(get_script_version)"
|
||||
bottom_line
|
||||
}
|
||||
|
||||
function remove_menu_ke() {
|
||||
clear
|
||||
remove_menu_ui_ke
|
||||
local remove_menu_opt
|
||||
while true; do
|
||||
read -p " ${white}Type your choice and validate with Enter: ${yellow}" remove_menu_opt
|
||||
case "${remove_menu_opt}" in
|
||||
1)
|
||||
if [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then
|
||||
error_msg "Moonraker and Nginx are not installed!"
|
||||
else
|
||||
run "remove_moonraker_nginx" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
2)
|
||||
if [ ! -d "$FLUIDD_FOLDER" ]; then
|
||||
error_msg "Fluidd is not installed!"
|
||||
elif [ ! -f "$CREALITY_WEB_FILE" ]; then
|
||||
error_msg "Creality Web Interface is removed!"
|
||||
echo -e " ${darkred}Please restore Creality Web Interface first if you want to remove Fluidd.${white}"
|
||||
echo
|
||||
else
|
||||
run "remove_fluidd" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
3)
|
||||
if [ ! -d "$MAINSAIL_FOLDER" ]; then
|
||||
error_msg "Mainsail is not installed!"
|
||||
elif [ ! -f "$CREALITY_WEB_FILE" ]; then
|
||||
error_msg "Creality Web Interface is removed!"
|
||||
echo -e " ${darkred}Please restore Creality Web Interface first if you want to remove Mainsail.${white}"
|
||||
echo
|
||||
else
|
||||
run "remove_mainsail" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
4)
|
||||
if [ ! -f "$ENTWARE_FILE" ]; then
|
||||
error_msg "Entware is not installed!"
|
||||
elif [ -f "$TIMELAPSE_FILE" ]; then
|
||||
error_msg "Entware is needed to use Moonraker Timelapse, please uninstall it first!"
|
||||
elif [ -f "$GIT_BACKUP_FILE" ]; then
|
||||
error_msg "Entware is needed to use Git Backup, please uninstall it first!"
|
||||
elif [ -d "$OCTOEVERYWHERE_FOLDER" ]; then
|
||||
error_msg "Entware is needed to use OctoEverywhere, please uninstall it first!"
|
||||
elif [ -d "$MOONRAKER_OBICO_FOLDER" ]; then
|
||||
error_msg "Entware is needed to use Moonraker Obico, please uninstall it first!"
|
||||
else
|
||||
run "remove_entware" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
5)
|
||||
if [ ! -f "$KLIPPER_SHELL_FILE" ]; then
|
||||
error_msg "Klipper Gcode Shell Command is not installed!"
|
||||
elif [ -d "$GUPPY_SCREEN_FOLDER" ]; then
|
||||
error_msg "Klipper Gcode Shell Command is needed to use Guppy Screen, please uninstall it first!"
|
||||
elif [ -d "$IMP_SHAPERS_FOLDER" ]; then
|
||||
error_msg "Klipper Gcode Shell Command is needed to use Improved Shapers Calibrations, please uninstall it first!"
|
||||
elif [ -d "$GIT_BACKUP_FOLDER" ]; then
|
||||
error_msg "Klipper Gcode Shell Command is needed to use Git Backup, please uninstall it first!"
|
||||
else
|
||||
run "remove_gcode_shell_command" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
6)
|
||||
if [ ! -d "$IMP_SHAPERS_FOLDER" ]; then
|
||||
error_msg "Improved Shapers Calibrations are not installed!"
|
||||
else
|
||||
run "remove_improved_shapers" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
7)
|
||||
if [ ! -f "$SAVE_ZOFFSET_FILE" ]; then
|
||||
error_msg "Save Z-Offset Macros are not installed!"
|
||||
else
|
||||
run "remove_save_zoffset_macros" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
8)
|
||||
if [ ! -f "$VIRTUAL_PINS_FILE" ]; then
|
||||
error_msg "Virtual Pins Support is not installed!"
|
||||
else
|
||||
run "remove_virtual_pins" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
9)
|
||||
if [ ! -f "$GIT_BACKUP_FILE" ]; then
|
||||
error_msg "Git Backup is not installed!"
|
||||
else
|
||||
run "remove_git_backup" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
10)
|
||||
if [ ! -f "$TIMELAPSE_FILE" ]; then
|
||||
error_msg "Moonraker Timelapse is not installed!"
|
||||
else
|
||||
run "remove_moonraker_timelapse" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
11)
|
||||
if [ ! -d "$OCTOEVERYWHERE_FOLDER" ]; then
|
||||
error_msg "OctoEverywhere is not installed!"
|
||||
else
|
||||
run "remove_octoeverywhere" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
12)
|
||||
if [ ! -d "$MOONRAKER_OBICO_FOLDER" ]; then
|
||||
error_msg "Moonraker Obico is not installed!"
|
||||
else
|
||||
run "remove_moonraker_obico" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
13)
|
||||
if [ ! -d "$MOBILERAKER_COMPANION_FOLDER" ]; then
|
||||
error_msg "Mobileraker Companion is not installed!"
|
||||
else
|
||||
run "remove_mobileraker_companion" "remove_menu_ui_ke"
|
||||
fi;;
|
||||
B|b)
|
||||
clear; main_menu; break;;
|
||||
Q|q)
|
||||
clear; exit 0;;
|
||||
*)
|
||||
error_msg "Please select a correct choice!";;
|
||||
esac
|
||||
done
|
||||
remove_menu_ke
|
||||
}
|
95
scripts/menu/KE/tools_menu_KE.sh
Executable file
95
scripts/menu/KE/tools_menu_KE.sh
Executable file
|
@ -0,0 +1,95 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
function tools_menu_ui_ke() {
|
||||
top_line
|
||||
title '[ TOOLS MENU ]' "${yellow}"
|
||||
inner_line
|
||||
hr
|
||||
menu_option ' 1' 'Prevent updating' 'Klipper configuration files'
|
||||
menu_option ' 2' 'Allow updating' 'Klipper configuration files'
|
||||
hr
|
||||
menu_option ' 3' 'Restart' 'Nginx service'
|
||||
menu_option ' 4' 'Restart' 'Moonraker service'
|
||||
menu_option ' 5' 'Restart' 'Klipper service'
|
||||
hr
|
||||
menu_option ' 6' 'Update' 'Entware packages'
|
||||
hr
|
||||
menu_option ' 7' 'Clear' 'cache'
|
||||
menu_option ' 8' 'Clear' 'logs files'
|
||||
hr
|
||||
menu_option ' 9' 'Restore' 'a previous firmware'
|
||||
hr
|
||||
menu_option '10' 'Reset' 'factory settings'
|
||||
hr
|
||||
inner_line
|
||||
hr
|
||||
bottom_menu_option 'b' 'Back to [Main Menu]' "${yellow}"
|
||||
bottom_menu_option 'q' 'Exit' "${darkred}"
|
||||
hr
|
||||
version_line "$(get_script_version)"
|
||||
bottom_line
|
||||
}
|
||||
|
||||
function tools_menu_ke() {
|
||||
clear
|
||||
tools_menu_ui_ke
|
||||
local tools_menu_opt
|
||||
while true; do
|
||||
read -p " ${white}Type your choice and validate with Enter: ${yellow}" tools_menu_opt
|
||||
case "${tools_menu_opt}" in
|
||||
1)
|
||||
if [ -f "$INITD_FOLDER"/disabled.S55klipper_service ]; then
|
||||
error_msg "Updating Klipper configuration files is already prevented!"
|
||||
else
|
||||
run "prevent_updating_klipper_files" "tools_menu_ui_ke"
|
||||
fi;;
|
||||
2)
|
||||
if [ ! -f "$INITD_FOLDER"/disabled.S55klipper_service ]; then
|
||||
error_msg "Updating Klipper configuration files is already allowed!"
|
||||
else
|
||||
run "allow_updating_klipper_files" "tools_menu_ui_ke"
|
||||
fi;;
|
||||
3)
|
||||
if [ ! -d "$NGINX_FOLDER" ]; then
|
||||
error_msg "Nginx is not installed!"
|
||||
else
|
||||
run "restart_nginx_action" "tools_menu_ui_ke"
|
||||
fi;;
|
||||
4)
|
||||
if [ ! -d "$MOONRAKER_FOLDER" ]; then
|
||||
error_msg "Moonraker is not installed!"
|
||||
else
|
||||
run "restart_moonraker_action" "tools_menu_ui_ke"
|
||||
fi;;
|
||||
5)
|
||||
if [ ! -f "$INITD_FOLDER"/S55klipper_service ]; then
|
||||
error_msg "Klipper service is not present!"
|
||||
else
|
||||
run "restart_klipper_action" "tools_menu_ui_ke"
|
||||
fi;;
|
||||
6)
|
||||
if [ ! -f "$ENTWARE_FILE" ]; then
|
||||
error_msg "Entware is not installed!"
|
||||
else
|
||||
run "update_entware_packages" "tools_menu_ui_ke"
|
||||
fi;;
|
||||
7)
|
||||
run "clear_cache" "tools_menu_ui_ke";;
|
||||
8)
|
||||
run "clear_logs" "tools_menu_ui_ke";;
|
||||
9)
|
||||
run "restore_previous_firmware" "tools_menu_ui_ke";;
|
||||
10)
|
||||
run "reset_factory_settings" "tools_menu_ui_ke";;
|
||||
B|b)
|
||||
clear; main_menu; break;;
|
||||
Q|q)
|
||||
clear; exit 0;;
|
||||
*)
|
||||
error_msg "Please select a correct choice!";;
|
||||
esac
|
||||
done
|
||||
tools_menu_ke
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue