mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-15 19:44:29 +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 #
|
# This file may be distributed under the terms of the GNU GPLv3 license #
|
||||||
#=======================================================================#
|
#=======================================================================#
|
||||||
|
|
||||||
# TODO: upload_log
|
|
||||||
# TODO: doublecheck that nothing got missed!
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
clear
|
clear
|
||||||
|
|
||||||
|
|||||||
@@ -112,8 +112,7 @@ function main_menu() {
|
|||||||
"restart crowsnest") do_action_service "restart" "crowsnest"; main_ui;;
|
"restart crowsnest") do_action_service "restart" "crowsnest"; main_ui;;
|
||||||
update) do_action "update_kiauh" "main_ui";;
|
update) do_action "update_kiauh" "main_ui";;
|
||||||
0)clear && print_header
|
0)clear && print_header
|
||||||
#upload_selection
|
upload_selection
|
||||||
print_error "Function currently disabled! Sorry!"
|
|
||||||
main_ui;;
|
main_ui;;
|
||||||
1)clear && print_header
|
1)clear && print_header
|
||||||
install_menu
|
install_menu
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ function upload_selection() {
|
|||||||
[[ ${upload_agreed} == "false" ]] && accept_upload_conditions
|
[[ ${upload_agreed} == "false" ]] && accept_upload_conditions
|
||||||
|
|
||||||
local logfiles
|
local logfiles
|
||||||
local logs_dir="${KLIPPER_LOGS}"
|
|
||||||
local webif_logs="/var/log/nginx"
|
local webif_logs="/var/log/nginx"
|
||||||
|
|
||||||
function find_logfile() {
|
function find_logfile() {
|
||||||
@@ -64,14 +63,18 @@ function upload_selection() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
find_logfile "kiauh\.log" "/tmp"
|
local logdir log_dirs
|
||||||
find_logfile "klippy(-[0-9a-zA-Z]+)?\.log" "${logs_dir}"
|
log_dirs=$(get_instance_folder_path "logs")
|
||||||
find_logfile "moonraker(-[0-9a-zA-Z]+)?\.log" "${logs_dir}"
|
for logdir in ${log_dirs}; do
|
||||||
find_logfile "telegram(-[0-9a-zA-Z]+)?\.log" "${logs_dir}"
|
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 "mainsail.*" "${webif_logs}"
|
||||||
find_logfile "fluidd.*" "${webif_logs}"
|
find_logfile "fluidd.*" "${webif_logs}"
|
||||||
find_logfile "KlipperScreen.log" "/tmp"
|
find_logfile "KlipperScreen.log" "/tmp"
|
||||||
find_logfile "webcamd\.log(\.[0-9]+)?$" "/var/log"
|
find_logfile "webcamd\.log(\.[0-9]+)?$" "/var/log"
|
||||||
|
find_logfile "kiauh\.log" "/tmp"
|
||||||
|
|
||||||
### draw interface
|
### draw interface
|
||||||
local i=0
|
local i=0
|
||||||
|
|||||||
Reference in New Issue
Block a user