From ee6ecca8d1cd8b0028e9306c299f9f2d6f9b8cdb Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Mon, 1 Jul 2024 23:00:06 +0330 Subject: [PATCH] Check WARP is active --- menu.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/menu.sh b/menu.sh index a94e604..3db769c 100644 --- a/menu.sh +++ b/menu.sh @@ -251,6 +251,12 @@ install_warp() { # Function to configure WARP configure_warp() { + # Check if wg-quick@wgcf.service is active + if ! systemctl is-active --quiet wg-quick@wgcf.service; then + echo "WARP is not active. Please Install WARP before configuring." + return + fi + if [ -f "/etc/hysteria/config.json" ]; then # Check the current status of WARP configurations warp_all_status=$(jq -r 'if .acl.inline | index("warps(all)") then "WARP active" else "Direct" end' /etc/hysteria/config.json)