[Update] Make sure containers are gone before updating mailcow

master
andryyy 2020-02-21 08:52:46 +01:00
parent 55151b1313
commit 838a215f67
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 7 additions and 1 deletions

View File

@ -376,9 +376,15 @@ git diff >> ${DIFF_FILE}
echo -e "\e[32mPrefetching images...\e[0m" echo -e "\e[32mPrefetching images...\e[0m"
prefetch_images prefetch_images
echo -e "Stopping mailcow... " echo -e "\e[32mStopping mailcow...\e[0m"
sleep 2 sleep 2
MAILCOW_CONTAINERS=($(docker-compose ps -q))
docker-compose down docker-compose down
echo -e "\e[32mChecking for remaining containers...\e[0m"
sleep 2
for container in "${MAILCOW_CONTAINERS[@]}"; do
docker rm -f "$container" 2> /dev/null
done
# Silently fixing remote url from andryyy to mailcow # Silently fixing remote url from andryyy to mailcow
git remote set-url origin https://github.com/mailcow/mailcow-dockerized git remote set-url origin https://github.com/mailcow/mailcow-dockerized