[init] 更新Osaka节点

This commit is contained in:
zeaslity
2023-10-10 15:16:56 +08:00
parent 6a46406d85
commit 81980cc472
5 changed files with 27 additions and 19 deletions

View File

@@ -108,13 +108,24 @@ shutdown_firewall() {
add_octopus_host() {
FunctionStart "添加Octopus自定义Hosts"
if grep -q "140.238" </etc/hosts; then
warn "自定义的Hosts已经配置完成 跳过!"
else
log "开始下载 自定义的Hosts文件"
wget "$oss_url_prefix/wdd-server-host.txt" -O /tmp/wdd-server-host.txt
cat /tmp/wdd-server-host.txt >>/etc/hosts
fi
cat >/etc/hosts<<EOF
127.0.0.1 localhost $(hostname)
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.1.1 $(hostname)
EOF
log "开始下载 自定义的Hosts文件"
wget "$oss_url_prefix/wdd-server-host.txt" -O /tmp/wdd-server-host.txt
cat /tmp/wdd-server-host.txt >>/etc/hosts
if grep -q "140.238" </etc/hosts; then
colorEchoGreen "自定义hosts添加成功"
@@ -870,7 +881,7 @@ main() {
fi
if [[ $is_install_host -eq 1 ]]; then
# 安装宇宙第一shell的zsh
# 添加自我服务器的所有hosts
add_octopus_host
fi