From 01338a62901fcff6c369fecdae4925d27482b5d5 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:47:36 +0330 Subject: [PATCH] Check installation --- menu.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/menu.sh b/menu.sh index 5a3bbc8..e141846 100644 --- a/menu.sh +++ b/menu.sh @@ -5,6 +5,12 @@ source /etc/hysteria/core/scripts/path.sh # OPTION HANDLERS (ONLY NEEDED ONE) hysteria2_install_handler() { + if systemctl is-active --quiet hysteria-server.service; then + echo "The hysteria-server.service is currently active." + echo "If you need to update the core, please use the 'Update Core' option." + return + fi + while true; do read -p "Enter the new port number you want to use: " port if ! [[ "$port" =~ ^[0-9]+$ ]] || [ "$port" -lt 1 ] || [ "$port" -gt 65535 ]; then @@ -13,6 +19,7 @@ hysteria2_install_handler() { break fi done + python3 $CLI_PATH install-hysteria2 --port "$port" }