mirror of
https://github.com/xubiaolin/docker-zerotier-planet.git
synced 2025-01-22 20:58:14 -05:00
feat: 🎸 支持升级
This commit is contained in:
parent
7e416e6935
commit
3a9885fcb8
16
deploy.sh
16
deploy.sh
@ -1,8 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
function deploy() {
|
|
||||||
imageName="zerotier-planet"
|
imageName="zerotier-planet"
|
||||||
|
|
||||||
|
function deploy() {
|
||||||
|
|
||||||
# 处理ip信息
|
# 处理ip信息
|
||||||
curr_ip=$(curl -s cip.cc | grep http | awk -F '/' '{print $4}')
|
curr_ip=$(curl -s cip.cc | grep http | awk -F '/' '{print $4}')
|
||||||
|
|
||||||
@ -52,11 +53,18 @@ function deploy() {
|
|||||||
docker cp zerotier-planet:/app/bin/planet /tmp/planet
|
docker cp zerotier-planet:/app/bin/planet /tmp/planet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function upgrade(){
|
||||||
|
echo "准备更新zerotier服务"
|
||||||
|
docker exec $imageName bash -c "apt update && apt upgrade zerotier-one" -y
|
||||||
|
docker restart $imageName
|
||||||
|
echo "done!"
|
||||||
|
}
|
||||||
|
|
||||||
function menu() {
|
function menu() {
|
||||||
echo
|
echo
|
||||||
echo "=============功能菜单============="
|
echo "=============功能菜单============="
|
||||||
echo "| 1 - 安装"
|
echo "| 1 - 安装"
|
||||||
#echo "| 2 - 更新"
|
echo "| 2 - 更新"
|
||||||
#echo "| 3 - 卸载"
|
#echo "| 3 - 卸载"
|
||||||
echo "| q - 退出"
|
echo "| q - 退出"
|
||||||
echo "---------------------------------"
|
echo "---------------------------------"
|
||||||
@ -67,8 +75,8 @@ function menu() {
|
|||||||
echo "安装"
|
echo "安装"
|
||||||
deploy
|
deploy
|
||||||
|
|
||||||
#elif [ "$n" = "2" ]; then
|
elif [ "$n" = "2" ]; then
|
||||||
# echo $n
|
upgrade
|
||||||
#elif [ "$n" = "3" ]; then
|
#elif [ "$n" = "3" ]; then
|
||||||
# echo $n
|
# echo $n
|
||||||
elif [ "$n" = "q" ]; then
|
elif [ "$n" = "q" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user