diff --git a/other/telegram/tgo/install.sh b/other/telegram/tgo/install.sh index c07916f5b..a90b4307b 100644 --- a/other/telegram/tgo/install.sh +++ b/other/telegram/tgo/install.sh @@ -13,10 +13,10 @@ systemctl disable mtproxy.service >/dev/null 2>&1 # export PATH=$(pwd)/go/bin:$PATH download_package mtproxygo mtg-linux.tar.gz -tar -xf mtg-linux.tar.gz -rm -rf mtg-linux -mv mtg-linux/mtg mtg - +tar -xf mtg-linux.tar.gz || exit 1 +rm -rf mtg-linux +mv mtg-linux/mtg mtg || exit 2 +set_installed_version mtproxygo # export GOPATH=/opt/hiddify-manager/other/telegram/tgo/go/ # export GOCACHE=/opt/hiddify-manager/other/telegram/tgo/gocache/ # git clone https://github.com/9seconds/mtg/ diff --git a/other/v2ray/install.sh b/other/v2ray/install.sh index 96c69e019..26c6d1d5c 100644 --- a/other/v2ray/install.sh +++ b/other/v2ray/install.sh @@ -1,8 +1,9 @@ source /opt/hiddify-manager/common/package_manager.sh install_package shadowsocks-libev -if ! is_installed ./v2ray-plugin_linux; then - download_package v2ray-plugin v2ray-plugin-linux.tar.gz - tar xvzf v2ray-plugin-linux.tar.gz - mv v2ray-plugin_linux_$(dpkg --print-architecture) v2ray-plugin_linux +download_package v2ray-plugin v2ray-plugin-linux.tar.gz +if [ "$?" == "0" ] || ! is_installed ./v2ray-plugin_linux; then + tar xvzf v2ray-plugin-linux.tar.gz || exit 1 + mv v2ray-plugin_linux_$(dpkg --print-architecture) v2ray-plugin_linux ||exit 2 + set_installed_version v2ray-plugin fi diff --git a/other/warp/wireguard/install.sh b/other/warp/wireguard/install.sh index 21f700dac..72473121c 100644 --- a/other/warp/wireguard/install.sh +++ b/other/warp/wireguard/install.sh @@ -1,7 +1,8 @@ # bash download_wgcf.sh source /opt/hiddify-manager/common/package_manager.sh -if ! is_installed ./wgcf; then - download_package wgcf wgcf - chmod +x wgcf -fi install_package wireguard-dkms wireguard-tools +download_package wgcf wgcf +if [ "$?" == "0" ] || ! is_installed ./wgcf; then + chmod +x wgcf || exit 1 + set_installed_version wgcf +fi diff --git a/singbox/install.sh b/singbox/install.sh index d37d289a9..c237692bc 100644 --- a/singbox/install.sh +++ b/singbox/install.sh @@ -10,12 +10,12 @@ version="" #use specific version if needed otherwise it will use the latest download_package singbox sb.zip $version if [ "$?" == "0" ] || ! is_installed ./sing-box; then install_package unzip - unzip -o sb.zip > /dev/null || return 1 - cp -f sing-box-*/sing-box . 2>/dev/null || return 2 - rm -r sb.zip sing-box-* 2>/dev/null || return 3 - chown root:root sing-box || return 4 - chmod +x sing-box || return 5 - ln -sf /opt/hiddify-manager/singbox/sing-box /usr/bin/sing-box || return 6 + unzip -o sb.zip > /dev/null || exit 1 + cp -f sing-box-*/sing-box . 2>/dev/null || exit 2 + rm -r sb.zip sing-box-* 2>/dev/null || exit 3 + chown root:root sing-box || exit 4 + chmod +x sing-box || exit 5 + ln -sf /opt/hiddify-manager/singbox/sing-box /usr/bin/sing-box || exit 6 rm geosite.db 2>/dev/null set_installed_version singbox $version fi diff --git a/xray/install.sh b/xray/install.sh index f33b5f521..8cf4296eb 100755 --- a/xray/install.sh +++ b/xray/install.sh @@ -10,10 +10,10 @@ if [ "$?" == "0" ] || ! is_installed ./bin/xray; then systemctl stop hiddify-xray.service > /dev/null 2>&1 rm -rf bin/* install_package unzip - unzip -o sb.zip -d bin/ > /dev/null || return 1 + unzip -o sb.zip -d bin/ > /dev/null || exit 1 rm -r sb.zip - chown root:root bin/xray || return 2 - chmod +x bin/xray || return 3 - ln -sf /opt/hiddify-manager/xray/bin/xray /usr/bin/xray || return 3 + chown root:root bin/xray || exit 2 + chmod +x bin/xray || exit 3 + ln -sf /opt/hiddify-manager/xray/bin/xray /usr/bin/xray || exit 3 set_installed_version xray $version fi