update-ipv4-input

This commit is contained in:
xubiaolin 2024-01-06 18:26:56 +08:00
parent dfd1cc5790
commit b4c4bc636a

View File

@ -35,7 +35,6 @@ function install(){
exit 1
fi
read -p "请输入zerotier-planet的API端口号,例如3443: " API_PORT
while [[ ! "$API_PORT" =~ ^[0-9]+$ ]]; do
read -p "端口号必须是数字,请重新输入: " API_PORT
@ -46,7 +45,6 @@ function install(){
exit 1
fi
read -p "请输入zerotier-planet的FILE端口号,例如3000: " FILE_PORT
while [[ ! "$FILE_PORT" =~ ^[0-9]+$ ]]; do
read -p "端口号必须是数字,请重新输入: " FILE_PORT
@ -57,7 +55,6 @@ function install(){
exit 1
fi
read -p "是否自动获取公网IP地址?(y/n)" use_auto_ip
use_auto_ip=${use_auto_ip:-y}
if [[ "$use_auto_ip" =~ ^[Yy]$ ]]; then
@ -86,19 +83,17 @@ function install(){
echo "IPv6地址为${ipv6}"
echo "---------------------------"
docker run -d --name myztplanet\
-p ${ZT_PORT}:${ZT_PORT} \
docker run -d --name myztplanet -p ${ZT_PORT}:${ZT_PORT} \
-p ${ZT_PORT}:${ZT_PORT}/udp \
-p ${API_PORT}:${API_PORT} \
-p ${FILE_PORT}:${FILE_PORT} \
-e IP_ADDR4=${ipv4} \
-e IP_ADDR6=${ipv6} \
-e ZT_PORT=${ZT_PORT} \
-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 xubiaolin/zerotier-planet:latest
if [ $? -ne 0 ]; then
echo "安装失败"
@ -213,8 +208,7 @@ function update(){
docker pull xubiaolin/zerotier-planet:latest
docker rm myztplanet
docker run -d --name myztplanet\
-p ${ZT_PORT}:${ZT_PORT} \
docker run -d --name myztplanet -p ${ZT_PORT}:${ZT_PORT} \
-p ${ZT_PORT}:${ZT_PORT}/udp \
-p ${API_PORT}:${API_PORT} \
-p ${FILE_PORT}:${FILE_PORT} \
@ -224,10 +218,7 @@ function update(){
-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 /data/config:/app/config\
xubiaolin/zerotier-planet:latest
-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
}
function menu() {