diff --git a/kiauh.sh b/kiauh.sh index 57cee66..3480a2a 100755 --- a/kiauh.sh +++ b/kiauh.sh @@ -9,9 +9,6 @@ # This file may be distributed under the terms of the GNU GPLv3 license # #=======================================================================# -# TODO: upload_log -# TODO: doublecheck that nothing got missed! - set -e clear diff --git a/scripts/ui/main_menu.sh b/scripts/ui/main_menu.sh index b833d4f..13df235 100755 --- a/scripts/ui/main_menu.sh +++ b/scripts/ui/main_menu.sh @@ -112,8 +112,7 @@ function main_menu() { "restart crowsnest") do_action_service "restart" "crowsnest"; main_ui;; update) do_action "update_kiauh" "main_ui";; 0)clear && print_header - #upload_selection - print_error "Function currently disabled! Sorry!" + upload_selection main_ui;; 1)clear && print_header install_menu diff --git a/scripts/upload_log.sh b/scripts/upload_log.sh index 2e23636..9f8dd9d 100755 --- a/scripts/upload_log.sh +++ b/scripts/upload_log.sh @@ -54,7 +54,6 @@ function upload_selection() { [[ ${upload_agreed} == "false" ]] && accept_upload_conditions local logfiles - local logs_dir="${KLIPPER_LOGS}" local webif_logs="/var/log/nginx" function find_logfile() { @@ -64,14 +63,18 @@ function upload_selection() { done } - find_logfile "kiauh\.log" "/tmp" - find_logfile "klippy(-[0-9a-zA-Z]+)?\.log" "${logs_dir}" - find_logfile "moonraker(-[0-9a-zA-Z]+)?\.log" "${logs_dir}" - find_logfile "telegram(-[0-9a-zA-Z]+)?\.log" "${logs_dir}" + local logdir log_dirs + log_dirs=$(get_instance_folder_path "logs") + for logdir in ${log_dirs}; do + find_logfile "klippy(-[0-9a-zA-Z]+)?\.log" "${logdir}" + find_logfile "moonraker(-[0-9a-zA-Z]+)?\.log" "${logdir}" + find_logfile "telegram(-[0-9a-zA-Z]+)?\.log" "${logdir}" + done find_logfile "mainsail.*" "${webif_logs}" find_logfile "fluidd.*" "${webif_logs}" find_logfile "KlipperScreen.log" "/tmp" find_logfile "webcamd\.log(\.[0-9]+)?$" "/var/log" + find_logfile "kiauh\.log" "/tmp" ### draw interface local i=0