feat: KIAUH v4.0.0 #191

Merged
dw-0 merged 453 commits from v4-rc into master 2022-05-29 20:11:16 +02:00
2 changed files with 17 additions and 19 deletions
Showing only changes of commit 11d3939e92 - Show all commits

View File

@@ -216,26 +216,25 @@ function get_mainsail_ver(){
} }
function mainsail_status(){ function mainsail_status(){
mcount=0 local status
mainsail_data=(
"${MAINSAIL_DIR}" ### remove the "SERVICE" entry from the data array if a moonraker service is installed
"${NGINX_SA}/mainsail" local data_arr=("${MAINSAIL_DIR}" "${NGINX_SA}/mainsail" "${NGINX_SE}/mainsail")
"${NGINX_SE}/mainsail"
) ### count+1 for each found data-item from array
#count+1 for each found data-item from array local filecount=0
for md in "${mainsail_data[@]}" for data in "${data_arr[@]}"; do
do [ -e "${data}" ] && filecount=$(("${filecount}" + 1))
if [ -e "${md}" ]; then
mcount=$((mcount + 1))
fi
done done
if [ "${mcount}" == "${#mainsail_data[*]}" ]; then
MAINSAIL_STATUS="${green}Installed!${white} " if [ "${filecount}" == "${#data_arr[*]}" ]; then
elif [ "${mcount}" == 0 ]; then status="${green}Installed!${white} "
MAINSAIL_STATUS="${red}Not installed!${white} " elif [ "${filecount}" == 0 ]; then
status="${red}Not installed!${white} "
else else
MAINSAIL_STATUS="${yellow}Incomplete!${white} " status="${yellow}Incomplete!${white} "
fi fi
echo "${status}"
} }
function get_local_mainsail_version(){ function get_local_mainsail_version(){

View File

@@ -20,7 +20,7 @@ main_ui(){
echo -e "| 1) [Install] | |" echo -e "| 1) [Install] | |"
echo -e "| 2) [Update] | Moonraker: $(get_moonraker_status)|" echo -e "| 2) [Update] | Moonraker: $(get_moonraker_status)|"
echo -e "| 3) [Remove] | |" echo -e "| 3) [Remove] | |"
echo -e "| 4) [Advanced] | Mainsail: $MAINSAIL_STATUS|" echo -e "| 4) [Advanced] | Mainsail: $(mainsail_status)|"
echo -e "| 5) [Backup] | Fluidd: $FLUIDD_STATUS|" echo -e "| 5) [Backup] | Fluidd: $FLUIDD_STATUS|"
echo -e "| | KlipperScreen: $(klipperscreen_status)|" echo -e "| | KlipperScreen: $(klipperscreen_status)|"
echo -e "| 6) [Settings] | Telegram Bot: $(get_telegram_bot_status)|" echo -e "| 6) [Settings] | Telegram Bot: $(get_telegram_bot_status)|"
@@ -66,7 +66,6 @@ main_menu(){
kiauh_update_dialog kiauh_update_dialog
#check install status #check install status
fluidd_status fluidd_status
mainsail_status
octoprint_status octoprint_status
main_ui main_ui
while true; do while true; do