comparison docker/libervia_cont.sh @ 23:b10f01885949

docker: fixed libervia_cont update + added some newlines
author Goffi <goffi@goffi.org>
date Sun, 19 Oct 2014 19:44:47 +0200
parents 2c861d6aa446
children f0a59c8f3490
comparison
equal deleted inserted replaced
22:2c861d6aa446 23:b10f01885949
220 docker rm $CONT > /dev/null 2>&1 || printf "... Error while removing $CONT\n" 220 docker rm $CONT > /dev/null 2>&1 || printf "... Error while removing $CONT\n"
221 done 221 done
222 printf "\n" 222 printf "\n"
223 ;; 223 ;;
224 UPDATE) 224 UPDATE)
225 printf "updating containers" 225 printf "updating containers...\n"
226 errors=0 226 errors=0
227 for CONT in $CONTAINERS data; do 227 for CONT in $CONTAINERS data; do
228 printf "\nupdating $CONT" 228 printf "\nupdating $CONT"
229 docker pull $ACCOUNT/$CONT:latest > /dev/null 2>&1 229 docker pull $ACCOUNT/$CONT:latest > /dev/null 2>&1
230 if [ $? -ne 0 ]; then 230 if [ $? -ne 0 ]; then
231 printf "... Error while updating $ACCOUNT/$CONT" 231 printf "... Error while updating $ACCOUNT/$CONT"
232 errors=1 232 errors=1
233 fi 233 fi
234 done 234 done
235 if [ errors -eq 0 ]; then 235 if [ $errors -eq 0 ]; then
236 printf "\nContainers are up-to-date" 236 printf "\n\nContainers are up-to-date\n"
237 else 237 else
238 printf "\nSome errors happened while updating containers" 238 printf "\n\nSome errors happened while updating containers\n"
239 exit 1 239 exit 1
240 fi 240 fi
241 ;; 241 ;;
242 BACKUP) 242 BACKUP)
243 filename="sat_data_backup_$(date '+%Y-%m-%d_%H:%M:%S').tar.gz" 243 filename="sat_data_backup_$(date '+%Y-%m-%d_%H:%M:%S').tar.gz"