mirror of
https://github.com/xubiaolin/docker-zerotier-planet.git
synced 2025-01-22 12:48:14 -05:00
feat: 🎸 支持升级
This commit is contained in:
parent
7e416e6935
commit
3a9885fcb8
16
deploy.sh
16
deploy.sh
@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
imageName="zerotier-planet"
|
||||
|
||||
function deploy() {
|
||||
imageName="zerotier-planet"
|
||||
|
||||
# 处理ip信息
|
||||
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
|
||||
}
|
||||
|
||||
function upgrade(){
|
||||
echo "准备更新zerotier服务"
|
||||
docker exec $imageName bash -c "apt update && apt upgrade zerotier-one" -y
|
||||
docker restart $imageName
|
||||
echo "done!"
|
||||
}
|
||||
|
||||
function menu() {
|
||||
echo
|
||||
echo "=============功能菜单============="
|
||||
echo "| 1 - 安装"
|
||||
#echo "| 2 - 更新"
|
||||
echo "| 2 - 更新"
|
||||
#echo "| 3 - 卸载"
|
||||
echo "| q - 退出"
|
||||
echo "---------------------------------"
|
||||
@ -67,8 +75,8 @@ function menu() {
|
||||
echo "安装"
|
||||
deploy
|
||||
|
||||
#elif [ "$n" = "2" ]; then
|
||||
# echo $n
|
||||
elif [ "$n" = "2" ]; then
|
||||
upgrade
|
||||
#elif [ "$n" = "3" ]; then
|
||||
# echo $n
|
||||
elif [ "$n" = "q" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user