mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 19:14:27 +05:00
refactor(log-upload): update log upload functions and re-enable access
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
3
kiauh.sh
3
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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user