Update deploy.sh

This commit is contained in:
AnJia
2018-08-27 12:10:23 +08:00
committed by GitHub
parent 3a5633d3c2
commit fab677d725

View File

@@ -200,8 +200,8 @@ do
docker_dir=$(docker info | grep "Docker Root Dir" | cut -d':' -f2) docker_dir=$(docker info | grep "Docker Root Dir" | cut -d':' -f2)
used=$(df -h ${docker_dir}|awk '{if(NR>1)print $5}') used=$(df -h ${docker_dir}|awk '{if(NR>1)print $5}')
echo -e "${red} duration:${duration}s, docker root dir :${docker_dir}:used:${used}" echo -e "${red} duration:${duration}s, docker root dir :${docker_dir}:used:${used}"
[[ ${used} > '70%' ]] && docker system prune -f -a [[ ${used} > '60%' ]] && docker system prune -f -a
sleep 30 sleep 10
fi fi
done done