Permalink
Browse files

If there is no port, and there's an old container, kill the old conta…

…iner.
  • Loading branch information...
darron committed Jun 4, 2014
1 parent 747ec50 commit 7afd14a75ec9a13ef8c23258d39849c811d04004
Showing with 8 additions and 0 deletions.
  1. +8 −0 bin/receiver.sh
View
@@ -103,6 +103,14 @@ then
then
echo "Port: $PORT"
fi
+ Kill the old container by ID.
+ if [ -n "$OLD_ID" ]
+ then
+ echo "Killing $OLD_ID container."
+ sudo docker kill $OLD_ID > /dev/null
+ else
+ echo "Not killing any containers."
+ fi
exit
fi

0 comments on commit 7afd14a

Please sign in to comment.