Skip to content

Commit

Permalink
2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaofeng1227 committed Mar 14, 2024
1 parent 76534fa commit 6111422
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
24 changes: 4 additions & 20 deletions systemd/script/crontab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,10 @@ check_ports() {

# get volume from container
function get_volume_path() {
local container_name="\$1"
local volume_name="\$2"
local retries=0
local max_retries=5
local mounts

while [ $retries -lt $max_retries ]; do
mounts=$(docker inspect -f '{{ json .Mounts }}' "$container_name" | jq -r ".[] | select(.Name == \"$volume_name\") | .Source")

if [[ "$mounts" == *"/"* ]]; then
echo "$mounts"
return 0
fi

((retries++))
sleep 5
done

echo "Cannot get volume path"
exit 1
local container_name="$1"
local volume_name="$2"
local mounts=$(docker inspect -f '{{ json .Mounts }}' "$container_name" | jq -r '.[] | select(.Name == "'$volume_name'") | .Source')
echo "$mounts"
}

volume_path=$(get_volume_path "$container_name" "$volume_name")
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.0.4",
"version": "2.0.5",
"plugins": {
"portainer": "0.0.9",
"nginx": "0.0.7",
Expand Down

0 comments on commit 6111422

Please sign in to comment.