mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-14 05:23:09 +00:00
bash menu - debug log, clear all logs
This commit is contained in:
27
x-ui.sh
27
x-ui.sh
@@ -371,10 +371,31 @@ disable() {
|
||||
}
|
||||
|
||||
show_log() {
|
||||
journalctl -u x-ui.service -e --no-pager -f
|
||||
if [[ $# == 0 ]]; then
|
||||
echo -e "${green}\t1.${plain} Debug Log"
|
||||
echo -e "${green}\t2.${plain} Clear All logs"
|
||||
echo -e "${green}\t0.${plain} Back to Main Menu"
|
||||
read -p "Choose an option: " choice
|
||||
|
||||
case "$choice" in
|
||||
0)
|
||||
return
|
||||
;;
|
||||
1)
|
||||
journalctl -u x-ui -e --no-pager -f -p debug
|
||||
if [[ $# == 0 ]]; then
|
||||
before_show_menu
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
2)
|
||||
sudo journalctl --rotate
|
||||
sudo journalctl --vacuum-time=1s
|
||||
echo "All Logs cleared."
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Invalid choice"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
update_shell() {
|
||||
|
||||
Reference in New Issue
Block a user