update 2023-04-24 23:35:42
This commit is contained in:
parent
163f1ba7eb
commit
c42dce5ed3
|
@ -10,7 +10,7 @@ PKG_NAME:=luci-app-cloudflarespeedtest
|
||||||
LUCI_TITLE:=LuCI support for Cloudflares Speed Test
|
LUCI_TITLE:=LuCI support for Cloudflares Speed Test
|
||||||
LUCI_DEPENDS:=+cdnspeedtest +openssl-util +curl
|
LUCI_DEPENDS:=+cdnspeedtest +openssl-util +curl
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
PKG_VERSION:=1.5.1
|
PKG_VERSION:=1.5.2
|
||||||
PKG_RELEASE:=0
|
PKG_RELEASE:=0
|
||||||
PKG_LICENSE:=AGPL-3.0
|
PKG_LICENSE:=AGPL-3.0
|
||||||
PKG_MAINTAINER:=mingxiaoyu <fengying0347@163.com>
|
PKG_MAINTAINER:=mingxiaoyu <fengying0347@163.com>
|
||||||
|
|
|
@ -158,10 +158,13 @@ function ip_replace(){
|
||||||
function host_ip() {
|
function host_ip() {
|
||||||
if [ "x${HOST_enabled}" == "x1" ] ;then
|
if [ "x${HOST_enabled}" == "x1" ] ;then
|
||||||
get_servers_config "host_domain"
|
get_servers_config "host_domain"
|
||||||
HOSTS_LINE="$bestip $host_domain"
|
HOSTS_LINE=$(echo "$host_domain" | sed 's/,/ /g' | sed "s/^/$bestip /g")
|
||||||
if [ -n "$(grep $host_domain /etc/hosts)" ]
|
host_domain_first=$(echo "$host_domain" | awk -F, '{print $1}')
|
||||||
|
|
||||||
|
if [ -n "$(grep $host_domain_first /etc/hosts)" ]
|
||||||
then
|
then
|
||||||
sed -i".bak" "/$host_domain/d" /etc/hosts
|
echo $host_domain_first
|
||||||
|
sed -i".bak" "/$host_domain_first/d" /etc/hosts
|
||||||
echo $HOSTS_LINE >> /etc/hosts;
|
echo $HOSTS_LINE >> /etc/hosts;
|
||||||
else
|
else
|
||||||
echo $HOSTS_LINE >> /etc/hosts;
|
echo $HOSTS_LINE >> /etc/hosts;
|
||||||
|
|
Loading…
Reference in New Issue