Fix automatic HTTPS bootstrap during VPS install

This commit is contained in:
kzolotarev95 committed 2026-08-17 23:41:45 +04:00
1 parent 5ef9abfbed
commit 3f6d0eca55
2 files changed
+96 -26

No files matched your search

+10 -7
View File
@@ -2,7 +2,7 @@
set -u
APP_NAME="OpenWrt Remote Hub"
INSTALLER_VERSION="2026-08-15-branding-v1"
INSTALLER_VERSION="2026-08-17-https-bootstrap-v1"
RAW_BASE="${RAW_URL:-https://raw.githubusercontent.com/kzolotarev95/luci-app-owrt-remote/main}"
STATE_DIR="${OWRT_REMOTE_STATE_DIR:-/var/lib/owrt-remote}"
HUB_LOGIN="${HUB_LOGIN:-admin}"
@@ -29,6 +29,13 @@ die() {
exit 1
}
apt_get() {
if ! command -v apt-get >/dev/null 2>&1; then
die "поддерживается Ubuntu/Debian с apt-get"
fi
$SUDO apt-get -o DPkg::Lock::Timeout=300 "$@"
}
need_cmd() {
command -v "$1" >/dev/null 2>&1 || die "не найдена команда: $1"
}
@@ -77,12 +84,8 @@ detect_vps_host() {
}
install_packages() {
if command -v apt-get >/dev/null 2>&1; then
$SUDO apt-get update
$SUDO apt-get install -y curl wget unzip python3 python3-venv openssh-client ca-certificates ufw
return
fi
die "поддерживается Ubuntu/Debian с apt-get"
apt_get update
apt_get install -y curl wget unzip python3 python3-venv openssh-client ca-certificates ufw
}
install_xray_binary() {