From 61e27b3e1a4b8d973eeb9aaf0835f78a3eedc591 Mon Sep 17 00:00:00 2001 From: hiddify-com <114227601+hiddify-com@users.noreply.github.com> Date: Sun, 15 Dec 2024 18:35:11 +0330 Subject: [PATCH] new: use warp when needed with ssh protocol --- other/ssh/disable.sh | 4 ++-- other/ssh/install.sh | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/other/ssh/disable.sh b/other/ssh/disable.sh index 83446c8cc..15e60512a 100644 --- a/other/ssh/disable.sh +++ b/other/ssh/disable.sh @@ -1,2 +1,2 @@ -systemctl stop hiddify-ssh-liberty-bridge -systemctl disable hiddify-ssh-liberty-bridge \ No newline at end of file +systemctl stop hiddify-ssh-liberty-bridge > /dev/null 2>&1 +systemctl disable hiddify-ssh-liberty-bridge > /dev/null 2>&1 \ No newline at end of file diff --git a/other/ssh/install.sh b/other/ssh/install.sh index 78bb6769d..9df9b4971 100644 --- a/other/ssh/install.sh +++ b/other/ssh/install.sh @@ -1,10 +1,12 @@ source /opt/hiddify-manager/common/utils.sh -latest=$(get_release_version ssh-liberty-bridge) +source /opt/hiddify-manager/common/package_manager.sh + mkdir -p host_key -if [ "$(cat VERSION 2>/dev/null)" != $latest ]; then - curl -sL -o ssh-liberty-bridge https://github.com/hiddify/ssh-liberty-bridge/releases/latest/download/ssh-liberty-bridge-$(dpkg --print-architecture) +version="" #use specific version if needed otherwise it will use the latest +download_package ssh-liberty-bridge ssh-liberty-bridge $version +if [ "$?" == "0" ] || ! is_installed ./ssh-liberty-bridge; then chmod +x ssh-liberty-bridge - echo $latest >VERSION useradd liberty-bridge + set_installed_version ssh-liberty-bridge $version fi -chown liberty-bridge .env* +chown liberty-bridge .env* \ No newline at end of file