Skip to content

Commit

Permalink
Update upgrade.sh
Browse files Browse the repository at this point in the history
fix: use the right command
  • Loading branch information
yrluke authored Jan 5, 2024
1 parent 2bff3ec commit 3e75e7c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions release/latest/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,8 @@ else
fi
fi

container_id=$(docker ps --filter ancestor=chaitin/safeline-tengine --format '{{.ID}}')
mount_path=$(docker inspect --format '{{range .Mounts}}{{if eq .Destination "/logs"}}{{.Source}}{{end}}{{end}}' $container_id)
safeline_path=$(dirname $mount_path)
container_id=$(docker ps -n 1 --filter name=.*safeline-mgt.* --format '{{.ID}}')
safeline_path=$(docker inspect --format '{{index .Config.Labels "com.docker.compose.project.working_dir"}}' $container_id)

while [ -z "$safeline_path" ]; do
echo -e -n "\033[34m[SafeLine] 未发现正在运行的雷池,请输入雷池安装路径 (留空则为 '$(pwd)'): \033[0m"
Expand Down

0 comments on commit 3e75e7c

Please sign in to comment.