From bdb371367ecff2c02c664ee94a78327d98557feb Mon Sep 17 00:00:00 2001 From: Shellgate <128194280+Shellgate@users.noreply.github.com> Date: Tue, 5 Dec 2023 05:23:07 +0330 Subject: [PATCH] Add Restart request x-ui.sh Add Restart request --- x-ui.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/x-ui.sh b/x-ui.sh index f24bfea5..1774e449 100644 --- a/x-ui.sh +++ b/x-ui.sh @@ -670,8 +670,14 @@ else fi echo -e "---------------------------" -sleep 2 - systemctl restart x-ui +sleep 1 +read -p "Do you want to restart x-ui? (y/n): " restart_choice +if [[ $restart_choice == [Yy] ]]; then + systemctl restart x-ui + echo "X-UI has been restarted." +else + echo "X-UI was not restarted." +fi before_show_menu ;; 2) @@ -723,8 +729,14 @@ else fi echo -e "---------------------------" -sleep 2 - systemctl restart x-ui +sleep 1 +read -p "Do you want to restart x-ui? (y/n): " restart_choice +if [[ $restart_choice == [Yy] ]]; then + systemctl restart x-ui + echo "X-UI has been restarted." +else + echo "X-UI was not restarted." +fi before_show_menu ;; *)