update 2025-03-22 00:26:16
This commit is contained in:
parent
41157cbcc4
commit
6bc7cb9e81
|
@ -6,12 +6,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=adguardhome
|
PKG_NAME:=adguardhome
|
||||||
PKG_VERSION:=0.107.58
|
PKG_VERSION:=0.107.59
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/AdGuardHome/tar.gz/v$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/AdGuardHome/tar.gz/v$(PKG_VERSION)?
|
||||||
PKG_HASH:=da6a52764090d8350d55bc14b957ec6afdee0bd21b34b010796e220bde5e9186
|
PKG_HASH:=b8bbc2d16394770520da4febd000e66d6df5839a230abea4d160f117bf3f11ed
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/AdGuardHome-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/AdGuardHome-$(PKG_VERSION)
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-3.0-only
|
PKG_LICENSE:=GPL-3.0-only
|
||||||
|
@ -58,7 +58,7 @@ define Download/adguardhome-frontend
|
||||||
URL:=https://github.com/AdguardTeam/AdGuardHome/releases/download/v$(PKG_VERSION)/
|
URL:=https://github.com/AdguardTeam/AdGuardHome/releases/download/v$(PKG_VERSION)/
|
||||||
URL_FILE:=AdGuardHome_frontend.tar.gz
|
URL_FILE:=AdGuardHome_frontend.tar.gz
|
||||||
FILE:=$(FRONTEND_FILE)
|
FILE:=$(FRONTEND_FILE)
|
||||||
HASH:=7bda3b9e33757c5a58a211b8a3d71a76a0311327fd009adf0935e6a3c4313f9f
|
HASH:=955051153aafdc924a7a4b05307628bd91b3b22c68c8f3e3c49a8b44e052c285
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_VERSION:=1.1.3-20250320
|
PKG_VERSION:=1.1.4-20250321
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI support for homeassistant
|
LUCI_TITLE:=LuCI support for homeassistant
|
||||||
|
|
|
@ -5,47 +5,29 @@ shift 1
|
||||||
|
|
||||||
istoreenhance_pull() {
|
istoreenhance_pull() {
|
||||||
local image_name="$1"
|
local image_name="$1"
|
||||||
local isInstall=$(command -v iStoreEnhance)
|
echo "docker pull ${image_name}"
|
||||||
local isRun=$(pgrep iStoreEnhance)
|
docker pull "$image_name"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
local isInstall=$(command -v iStoreEnhance)
|
||||||
|
local isRun=$(pgrep iStoreEnhance)
|
||||||
|
# 判断iStoreEnhance是否运行
|
||||||
|
if [ -n "$isRun" ]; then
|
||||||
|
# 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址
|
||||||
|
local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}')
|
||||||
|
|
||||||
# 判断iStoreEnhance是否运行
|
if [[ -n "$registry_mirror" ]]; then
|
||||||
if [ -n "$isRun" ]; then
|
|
||||||
# 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址
|
|
||||||
local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}')
|
|
||||||
|
|
||||||
if [[ -n "$registry_mirror" ]]; then
|
|
||||||
# 提取主机和端口部分
|
|
||||||
local registry_host=$(echo ${registry_mirror} | sed -E 's|^https?://([^/]+).*|\1|')
|
|
||||||
# 拼接完整的镜像地址
|
|
||||||
local full_image_name="$registry_host/$image_name"
|
|
||||||
echo "istoreenhance_pull ${full_image_name}"
|
|
||||||
# 直接拉取镜像
|
|
||||||
docker pull "$full_image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "istoreenhance_pull failed"
|
echo "istoreenhance_pull failed"
|
||||||
exit 1
|
else
|
||||||
|
echo "download failed, not found registry.linkease.net"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "istoreenhance_pull ${image_name}"
|
|
||||||
docker pull "$image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "download failed, not found registry.linkease.net"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# 否则运行 docker pull
|
|
||||||
echo "docker pull ${image_name}"
|
|
||||||
docker pull "$image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
# 判断是否安装 iStoreEnhance
|
|
||||||
if [ -z "$isInstall" ]; then
|
if [ -z "$isInstall" ]; then
|
||||||
echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\""
|
echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\""
|
||||||
else
|
else
|
||||||
echo "download failed, enable istoreenhance to speedup"
|
echo "download failed, enable istoreenhance to speedup"
|
||||||
fi
|
fi
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_VERSION:=1.0.1-20250320
|
PKG_VERSION:=1.0.2-20250321
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI support for Immich
|
LUCI_TITLE:=LuCI support for Immich
|
||||||
|
|
|
@ -6,47 +6,29 @@ shift 1
|
||||||
|
|
||||||
istoreenhance_pull() {
|
istoreenhance_pull() {
|
||||||
local image_name="$1"
|
local image_name="$1"
|
||||||
local isInstall=$(command -v iStoreEnhance)
|
echo "docker pull ${image_name}"
|
||||||
local isRun=$(pgrep iStoreEnhance)
|
docker pull "$image_name"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
local isInstall=$(command -v iStoreEnhance)
|
||||||
|
local isRun=$(pgrep iStoreEnhance)
|
||||||
|
# 判断iStoreEnhance是否运行
|
||||||
|
if [ -n "$isRun" ]; then
|
||||||
|
# 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址
|
||||||
|
local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}')
|
||||||
|
|
||||||
# 判断iStoreEnhance是否运行
|
if [[ -n "$registry_mirror" ]]; then
|
||||||
if [ -n "$isRun" ]; then
|
|
||||||
# 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址
|
|
||||||
local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}')
|
|
||||||
|
|
||||||
if [[ -n "$registry_mirror" ]]; then
|
|
||||||
# 提取主机和端口部分
|
|
||||||
local registry_host=$(echo ${registry_mirror} | sed -E 's|^https?://([^/]+).*|\1|')
|
|
||||||
# 拼接完整的镜像地址
|
|
||||||
local full_image_name="$registry_host/$image_name"
|
|
||||||
echo "istoreenhance_pull ${full_image_name}"
|
|
||||||
# 直接拉取镜像
|
|
||||||
docker pull "$full_image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "istoreenhance_pull failed"
|
echo "istoreenhance_pull failed"
|
||||||
exit 1
|
else
|
||||||
|
echo "download failed, not found registry.linkease.net"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "istoreenhance_pull ${image_name}"
|
|
||||||
docker pull "$image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "download failed, not found registry.linkease.net"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# 否则运行 docker pull
|
|
||||||
echo "docker pull ${image_name}"
|
|
||||||
docker pull "$image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
# 判断是否安装 iStoreEnhance
|
|
||||||
if [ -z "$isInstall" ]; then
|
if [ -z "$isInstall" ]; then
|
||||||
echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\""
|
echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\""
|
||||||
else
|
else
|
||||||
echo "download failed, enable istoreenhance to speedup"
|
echo "download failed, enable istoreenhance to speedup"
|
||||||
fi
|
fi
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_VERSION:=1.0.3-20250320
|
PKG_VERSION:=1.0.4-20250321
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI support for ITTools
|
LUCI_TITLE:=LuCI support for ITTools
|
||||||
|
|
|
@ -6,47 +6,29 @@ shift 1
|
||||||
|
|
||||||
istoreenhance_pull() {
|
istoreenhance_pull() {
|
||||||
local image_name="$1"
|
local image_name="$1"
|
||||||
local isInstall=$(command -v iStoreEnhance)
|
echo "docker pull ${image_name}"
|
||||||
local isRun=$(pgrep iStoreEnhance)
|
docker pull "$image_name"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
local isInstall=$(command -v iStoreEnhance)
|
||||||
|
local isRun=$(pgrep iStoreEnhance)
|
||||||
|
# 判断iStoreEnhance是否运行
|
||||||
|
if [ -n "$isRun" ]; then
|
||||||
|
# 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址
|
||||||
|
local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}')
|
||||||
|
|
||||||
# 判断iStoreEnhance是否运行
|
if [[ -n "$registry_mirror" ]]; then
|
||||||
if [ -n "$isRun" ]; then
|
|
||||||
# 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址
|
|
||||||
local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}')
|
|
||||||
|
|
||||||
if [[ -n "$registry_mirror" ]]; then
|
|
||||||
# 提取主机和端口部分
|
|
||||||
local registry_host=$(echo ${registry_mirror} | sed -E 's|^https?://([^/]+).*|\1|')
|
|
||||||
# 拼接完整的镜像地址
|
|
||||||
local full_image_name="$registry_host/$image_name"
|
|
||||||
echo "istoreenhance_pull ${full_image_name}"
|
|
||||||
# 直接拉取镜像
|
|
||||||
docker pull "$full_image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "istoreenhance_pull failed"
|
echo "istoreenhance_pull failed"
|
||||||
exit 1
|
else
|
||||||
|
echo "download failed, not found registry.linkease.net"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "istoreenhance_pull ${image_name}"
|
|
||||||
docker pull "$image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "download failed, not found registry.linkease.net"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# 否则运行 docker pull
|
|
||||||
echo "docker pull ${image_name}"
|
|
||||||
docker pull "$image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
# 判断是否安装 iStoreEnhance
|
|
||||||
if [ -z "$isInstall" ]; then
|
if [ -z "$isInstall" ]; then
|
||||||
echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\""
|
echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\""
|
||||||
else
|
else
|
||||||
echo "download failed, enable istoreenhance to speedup"
|
echo "download failed, enable istoreenhance to speedup"
|
||||||
fi
|
fi
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_VERSION:=1.2.1-20250320
|
PKG_VERSION:=1.2.2-20250321
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI support for jellyfin
|
LUCI_TITLE:=LuCI support for jellyfin
|
||||||
|
|
|
@ -10,47 +10,29 @@ IMAGE_NAME='default'
|
||||||
|
|
||||||
istoreenhance_pull() {
|
istoreenhance_pull() {
|
||||||
local image_name="$1"
|
local image_name="$1"
|
||||||
local isInstall=$(command -v iStoreEnhance)
|
echo "docker pull ${image_name}"
|
||||||
local isRun=$(pgrep iStoreEnhance)
|
docker pull "$image_name"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
local isInstall=$(command -v iStoreEnhance)
|
||||||
|
local isRun=$(pgrep iStoreEnhance)
|
||||||
|
# 判断iStoreEnhance是否运行
|
||||||
|
if [ -n "$isRun" ]; then
|
||||||
|
# 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址
|
||||||
|
local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}')
|
||||||
|
|
||||||
# 判断iStoreEnhance是否运行
|
if [[ -n "$registry_mirror" ]]; then
|
||||||
if [ -n "$isRun" ]; then
|
|
||||||
# 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址
|
|
||||||
local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}')
|
|
||||||
|
|
||||||
if [[ -n "$registry_mirror" ]]; then
|
|
||||||
# 提取主机和端口部分
|
|
||||||
local registry_host=$(echo ${registry_mirror} | sed -E 's|^https?://([^/]+).*|\1|')
|
|
||||||
# 拼接完整的镜像地址
|
|
||||||
local full_image_name="$registry_host/$image_name"
|
|
||||||
echo "istoreenhance_pull ${full_image_name}"
|
|
||||||
# 直接拉取镜像
|
|
||||||
docker pull "$full_image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "istoreenhance_pull failed"
|
echo "istoreenhance_pull failed"
|
||||||
exit 1
|
else
|
||||||
|
echo "download failed, not found registry.linkease.net"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "istoreenhance_pull ${image_name}"
|
|
||||||
docker pull "$image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "download failed, not found registry.linkease.net"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# 否则运行 docker pull
|
|
||||||
echo "docker pull ${image_name}"
|
|
||||||
docker pull "$image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
# 判断是否安装 iStoreEnhance
|
|
||||||
if [ -z "$isInstall" ]; then
|
if [ -z "$isInstall" ]; then
|
||||||
echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\""
|
echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\""
|
||||||
else
|
else
|
||||||
echo "download failed, enable istoreenhance to speedup"
|
echo "download failed, enable istoreenhance to speedup"
|
||||||
fi
|
fi
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@ local geoip_all_tag = {}
|
||||||
local srss_path = "/tmp/etc/" .. appname .."/srss/"
|
local srss_path = "/tmp/etc/" .. appname .."/srss/"
|
||||||
|
|
||||||
local function convert_geofile()
|
local function convert_geofile()
|
||||||
local geo_path = uci:get(appname, "@global_rules[0]", "v2ray_location_asset") or "/usr/share/v2ray/"
|
local geo_dir = (uci:get(appname, "@global_rules[0]", "v2ray_location_asset") or "/usr/share/v2ray/"):match("^(.*)/")
|
||||||
local geosite_path = geo_path:match("^(.*)/") .. "/geosite.dat"
|
local geosite_path = geo_dir .. "/geosite.dat"
|
||||||
local geoip_path = geo_path:match("^(.*)/") .. "/geoip.dat"
|
local geoip_path = geo_dir .. "/geoip.dat"
|
||||||
if not api.is_finded("geoview") then
|
if not api.is_finded("geoview") then
|
||||||
api.log("* 注意:缺少 geoview 组件,Sing-Box 分流将无法启用!")
|
api.log("* 注意:缺少 geoview 组件,Sing-Box 分流将无法启用!")
|
||||||
return
|
return
|
||||||
|
@ -25,24 +25,23 @@ local function convert_geofile()
|
||||||
if not fs.access(srss_path) then
|
if not fs.access(srss_path) then
|
||||||
fs.mkdir(srss_path)
|
fs.mkdir(srss_path)
|
||||||
end
|
end
|
||||||
if next(geosite_all_tag) and fs.access(geosite_path) then
|
local function convert(file_path, prefix, tags)
|
||||||
for k,v in pairs(geosite_all_tag) do
|
if next(tags) and fs.access(file_path) then
|
||||||
local srs_file = srss_path .. "geosite-" .. k ..".srs"
|
for k in pairs(tags) do
|
||||||
if not fs.access(srs_file) then
|
local srs_file = srss_path .. prefix .. "-" .. k .. ".srs"
|
||||||
sys.exec("geoview -type geosite -action convert -input " .. geosite_path .. " -list '" .. k .. "' -output " .. srs_file .. " -lowmem=true")
|
if not fs.access(srs_file) then
|
||||||
--api.log("* 转换geosite:" .. k .. " 到 Sing-Box 规则集二进制文件")
|
local cmd = string.format("geoview -type %s -action convert -input %s -list '%s' -output %s -lowmem=true",
|
||||||
end
|
prefix, file_path, k, srs_file)
|
||||||
end
|
sys.exec(cmd)
|
||||||
end
|
local status = fs.access(srs_file) and "成功。" or "失败!"
|
||||||
if next(geoip_all_tag) and fs.access(geoip_path) then
|
api.log(string.format(" - 转换 %s:%s ... %s", prefix, k, status))
|
||||||
for k,v in pairs(geoip_all_tag) do
|
end
|
||||||
local srs_file = srss_path .. "geoip-" .. k ..".srs"
|
|
||||||
if not fs.access(srs_file) then
|
|
||||||
sys.exec("geoview -type geoip -action convert -input " .. geoip_path .. " -list '" .. k .. "' -output " .. srs_file .. " -lowmem=true")
|
|
||||||
--api.log("* 转换geoip:" .. k .. " 到 Sing-Box 规则集二进制文件")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
api.log("Sing-Box 规则集转换:")
|
||||||
|
convert(geosite_path, "geosite", geosite_all_tag)
|
||||||
|
convert(geoip_path, "geoip", geoip_all_tag)
|
||||||
end
|
end
|
||||||
|
|
||||||
local new_port
|
local new_port
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_VERSION:=1.1.5-20250319
|
PKG_VERSION:=1.1.6-20250321
|
||||||
PKG_RELEASE:=
|
PKG_RELEASE:=
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI support for wxedge
|
LUCI_TITLE:=LuCI support for wxedge
|
||||||
|
|
|
@ -10,47 +10,29 @@ shift 1
|
||||||
# 4. 反之运行docker pull
|
# 4. 反之运行docker pull
|
||||||
istoreenhance_pull() {
|
istoreenhance_pull() {
|
||||||
local image_name="$1"
|
local image_name="$1"
|
||||||
local isInstall=$(command -v iStoreEnhance)
|
echo "docker pull ${image_name}"
|
||||||
local isRun=$(pgrep iStoreEnhance)
|
docker pull "$image_name"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
local isInstall=$(command -v iStoreEnhance)
|
||||||
|
local isRun=$(pgrep iStoreEnhance)
|
||||||
|
# 判断iStoreEnhance是否运行
|
||||||
|
if [ -n "$isRun" ]; then
|
||||||
|
# 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址
|
||||||
|
local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}')
|
||||||
|
|
||||||
# 判断iStoreEnhance是否运行
|
if [[ -n "$registry_mirror" ]]; then
|
||||||
if [ -n "$isRun" ]; then
|
|
||||||
# 使用 docker info 获取包含 registry.linkease.net 的镜像服务器地址
|
|
||||||
local registry_mirror=$(docker info 2>/dev/null | awk -F': ' '/Registry Mirrors:/ {found=1; next} found && NF {if ($0 ~ /registry.linkease.net/) {print; exit}}')
|
|
||||||
|
|
||||||
if [[ -n "$registry_mirror" ]]; then
|
|
||||||
# 提取主机和端口部分
|
|
||||||
local registry_host=$(echo ${registry_mirror} | sed -E 's|^https?://([^/]+).*|\1|')
|
|
||||||
# 拼接完整的镜像地址
|
|
||||||
local full_image_name="$registry_host/$image_name"
|
|
||||||
echo "istoreenhance_pull ${full_image_name}"
|
|
||||||
# 直接拉取镜像
|
|
||||||
docker pull "$full_image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "istoreenhance_pull failed"
|
echo "istoreenhance_pull failed"
|
||||||
exit 1
|
else
|
||||||
|
echo "download failed, not found registry.linkease.net"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "istoreenhance_pull ${image_name}"
|
|
||||||
docker pull "$image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "download failed, not found registry.linkease.net"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# 否则运行 docker pull
|
|
||||||
echo "docker pull ${image_name}"
|
|
||||||
docker pull "$image_name"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
# 判断是否安装 iStoreEnhance
|
|
||||||
if [ -z "$isInstall" ]; then
|
if [ -z "$isInstall" ]; then
|
||||||
echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\""
|
echo "download failed, install istoreenhance to speedup, \"https://doc.linkease.com/zh/guide/istore/software/istoreenhance.html\""
|
||||||
else
|
else
|
||||||
echo "download failed, enable istoreenhance to speedup"
|
echo "download failed, enable istoreenhance to speedup"
|
||||||
fi
|
fi
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue