Skip to content

Commit

Permalink
fix-path
Browse files Browse the repository at this point in the history
  • Loading branch information
xubiaolin committed Dec 25, 2023
1 parent aa90f82 commit 1bdd095
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function install(){
fi

docker rm -f myztplanet
rm -f ./data/zerotier
rm -f $(pwd)/data/zerotier

ZT_PORT=9994
API_PORT=3443
Expand Down Expand Up @@ -94,10 +94,10 @@ function install(){
-e ZT_PORT=${ZT_PORT} \
-e API_PORT=${API_PORT} \
-e FILE_SERVER_PORT=${FILE_PORT} \
-v ./data/zerotier/dist:/app/dist \
-v ./data/zerotier/ztncui:/app/ztncui\
-v ./data/zerotier/one:/var/lib/zerotier-one\
-v ./data/zerotier/config:/app/config\
-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

if [ $? -ne 0 ]; then
Expand All @@ -123,7 +123,7 @@ function install(){
echo "请及时修改密码"
echo "---------------------------"

echo "moon配置和planet配置在 ./data/zerotier/dist 目录下"
echo "moon配置和planet配置在 $(pwd)/data/zerotier/dist 目录下"
echo -e "moons 文件下载: http://${ipv4}:${FILE_PORT}/${MOON_NAME}?key=${KEY} "
echo -e "planet文件下载: http://${ipv4}:${FILE_PORT}/planet?key=${KEY} "

Expand Down Expand Up @@ -155,7 +155,7 @@ function info(){
echo "默认密码:password"
echo "请及时修改密码"
echo "---------------------------"
echo "moon配置和planet配置在 ./data/zerotier/dist 目录下"
echo "moon配置和planet配置在 $(pwd)/data/zerotier/dist 目录下"
echo ""
echo "planet文件下载: http://${ipv4}:${FILE_PORT}/planet?key=${KEY} "
echo "moon文件下载: http://${ipv4}:${FILE_PORT}/${MOON_NAME}?key=${KEY} "
Expand All @@ -173,7 +173,7 @@ function uninstall(){
read -p "是否删除数据?(y/n)" delete_data
delete_data=${delete_data:-n}
if [[ "$delete_data" =~ ^[Yy]$ ]]; then
rm -rf ./data/zerotier
rm -rf $(pwd)/data/zerotier
fi

echo "卸载完成"
Expand All @@ -191,8 +191,8 @@ function update(){

echo "开始更新..."

if [ ! -d "./data/zerotier" ]; then
echo "目录./data/zerotier不存在,无法更新"
if [ ! -d "$(pwd)/data/zerotier" ]; then
echo "目录$(pwd)/data/zerotier不存在,无法更新"
exit 0
fi

Expand Down Expand Up @@ -221,9 +221,9 @@ function update(){
-e ZT_PORT=${ZT_PORT} \
-e API_PORT=${API_PORT} \
-e FILE_SERVER_PORT=${FILE_PORT} \
-v ./data/zerotier/dist:/app/dist \
-v ./data/zerotier/ztncui:/app/ztncui\
-v ./data/zerotier/one:/var/lib/zerotier-one\
-v $(pwd)/data/zerotier/dist:/app/dist \
-v $(pwd)/data/zerotier/ztncui:/app/ztncui\
-v $(pwd)/data/zerotier/one:/var/lib/zerotier-one\
-v /data/config:/app/config\
xubiaolin/zerotier-planet:latest
}
Expand Down

0 comments on commit 1bdd095

Please sign in to comment.