Skip to content

Commit

Permalink
默认开机自启修复安全性问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xubiaolin committed Jan 30, 2024
1 parent 5d14121 commit 939f55a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "安装失败"
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 939f55a

Please sign in to comment.