Fix for reading logs

This commit is contained in:
Evgeny Volferts 2025-09-22 17:48:09 +03:00
parent a28fa2eddd
commit e56b70ee5f

22
x-ui.sh
View file

@ -402,6 +402,27 @@ disable() {
}
show_log() {
if [[ $release == "alpine" ]]; then
echo -e "${green}\t1.${plain} Debug Log"
echo -e "${green}\t0.${plain} Back to Main Menu"
read -rp "Choose an option: " choice
case "$choice" in
0)
show_menu
;;
1)
grep -F 'x-ui[' /var/log/messages
if [[ $# == 0 ]]; then
before_show_menu
fi
;;
*)
echo -e "${red}Invalid option. Please select a valid number.${plain}\n"
show_log
;;
esac
else
echo -e "${green}\t1.${plain} Debug Log"
echo -e "${green}\t2.${plain} Clear All logs"
echo -e "${green}\t0.${plain} Back to Main Menu"
@ -428,6 +449,7 @@ show_log() {
show_log
;;
esac
fi
}
bbr_menu() {