默认开机自启修复安全性问题

This commit is contained in:
xubiaolin 2024-01-30 19:09:24 +08:00
parent 5d14121329
commit 939f55ae53
2 changed files with 6 additions and 2 deletions

View File

@ -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 "安装失败"

View File

@ -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