chore: fix version check in install_server.sh

This commit is contained in:
Haruue Icymoon 2023-09-04 20:55:34 +08:00
parent 08372d972c
commit 099faa93a4
No known key found for this signature in database
GPG key ID: F6083B28CBCBC148

View file

@ -758,7 +758,7 @@ is_hysteria1_version() {
get_installed_version() {
if is_hysteria_installed; then
if "$EXECUTABLE_INSTALL_PATH" version > /dev/null 2>&1; then
"$EXECUTABLE_INSTALL_PATH" version | grep Version | grep -o 'v[.1-9]*'
"$EXECUTABLE_INSTALL_PATH" version | grep Version | grep -o 'v[.0-9]*'
elif "$EXECUTABLE_INSTALL_PATH" -v > /dev/null 2>&1; then
# hysteria 1
"$EXECUTABLE_INSTALL_PATH" -v | cut -d ' ' -f 3