From 939f55ae53e639e6a63e9e8ae49cc51d36f65044 Mon Sep 17 00:00:00 2001 From: xubiaolin Date: Tue, 30 Jan 2024 19:09:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=BC=80=E6=9C=BA=E8=87=AA?= =?UTF-8?q?=E5=90=AF=E4=BF=AE=E5=A4=8D=E5=AE=89=E5=85=A8=E6=80=A7=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 6 +++++- entrypoint.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index d20c030..d4d0c8b 100755 --- a/deploy.sh +++ b/deploy.sh @@ -93,7 +93,11 @@ function install() { -e API_PORT=${API_PORT} \ -e FILE_SERVER_PORT=${FILE_PORT} \ -v $(pwd)/data/zerotier/dist:/app/dist \ - -v $(pwd)/data/zerotier/ztncui:/app/ztncui -v $(pwd)/data/zerotier/one:/var/lib/zerotier-one -v $(pwd)/data/zerotier/config:/app/config xubiaolin/zerotier-planet:latest + -v $(pwd)/data/zerotier/ztncui:/app/ztncui \ + -v $(pwd)/data/zerotier/one:/var/lib/zerotier-one\ + -v $(pwd)/data/zerotier/config:/app/config\ + --restart unless-stopped\ + xubiaolin/zerotier-planet:latest if [ $? -ne 0 ]; then echo "安装失败" diff --git a/entrypoint.sh b/entrypoint.sh index e47585f..4185168 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -35,6 +35,7 @@ function check_zerotier() { echo "start mkmoonworld" openssl rand -hex 16 > authtoken.secret + ./zerotier-idtool generate identity.secret identity.public ./zerotier-idtool initmoon identity.public >moon.json if [ -z "$IP_ADDR4" ]; then IP_ADDR4=$(curl -s https://ipv4.icanhazip.com/); fi @@ -63,7 +64,6 @@ function check_zerotier() { jq --argjson newEndpoints "$stableEndpoints" '.roots[0].stableEndpoints = $newEndpoints' moon.json >temp.json && mv temp.json moon.json ./zerotier-idtool genmoon moon.json && mkdir -p moons.d && cp ./*.moon ./moons.d - # wget "${GH_MIRROR}https://github.com/kaaass/ZeroTierOne/releases/download/mkmoonworld-1.0/mkmoonworld-x86_64" cp /app/mkmoonworld-x86_64 ./mkmoonworld-x86_64 chmod +x ./mkmoonworld-x86_64 ./mkmoonworld-x86_64 moon.json