From 5029cf9e5e7f0f7d309428e941b03a4ce8a02e45 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Fri, 20 Dec 2024 22:45:08 +0330 Subject: [PATCH] Fix: Core Version --- core/scripts/utils.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/scripts/utils.sh b/core/scripts/utils.sh index b04f9fe..7fcc5a5 100644 --- a/core/scripts/utils.sh +++ b/core/scripts/utils.sh @@ -18,7 +18,6 @@ get_system_info() { IP=$(echo "$IP_API_DATA" | jq -r '.ip') CPU=$(top -bn1 | grep "Cpu(s)" | awk '{print $2 + $4 "%"}') RAM=$(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2 }') - HCVERSION=$(hysteria version | grep "^Version:" | awk '{print $2}') } version_greater_equal() { @@ -40,6 +39,12 @@ version_greater_equal() { return 0 } +check_core_version() { + if systemctl is-active --quiet hysteria-server.service; then + HCVERSION=$(hysteria version | grep "^Version:" | awk '{print $2}') + fi +} + check_version() { local_version=$(cat $LOCALVERSION) latest_version=$(curl -s $LATESTVERSION)