[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

@@ -22,6 +22,10 @@
140.238.52.228 tokyo-2 t2
140.83.84.142 osaka-1 o1
140.83.58.96 osaka-2 o2
42.192.52.227 tc-sh
43.128.39.232 tc-hk

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

View File

@@ -5,8 +5,6 @@ if [[ ! -f /root/wdd/lib/wdd-lib-log.sh ]]; then
fi
source /root/wdd/lib/wdd-lib-log.sh
. ./wdd-lib-log.sh
CleanOracleAgent() {
FunctionStart
@@ -15,7 +13,6 @@ CleanOracleAgent() {
snap stop oracle-cloud-agent
snap remove oracle-cloud-agent
systemctl status snapd.service
for i in $(ls /lib/systemd/system/ | grep snapd | awk '{print$1}'); do
echo $i