add test that ensures bootstrap can not run when postgres is running
[discourse_docker.git] / launcher
index 77b3fa9f407c6915b1ea82bfd77a3947da80babe..7b107a1974a41a3b0331c4f790f1b4a4a8bf80d9 100755 (executable)
--- a/launcher
+++ b/launcher
@@ -146,7 +146,7 @@ case "$command" in
       docker commit `cat $cidbootstrap` $local_discourse/$config || echo 'FAILED TO COMMIT'
       docker rm `cat $cidbootstrap` && rm $cidbootstrap
 
-      echo "Successfully bootstrappd, to startup use ./launcher start $config"
+      echo "Successfully bootstrapped, to startup use ./launcher start $config"
       exit 0
       ;;
 
@@ -197,7 +197,7 @@ case "$command" in
            set_template_info
            set_volumes
 
-           existing=`docker ps -a | awk '{ print $1, $(NF) }' | grep $config | awk '{ print $1 }'`
+           existing=`docker ps -a | awk '{ print $1, $(NF) }' | grep "$config$" | awk '{ print $1 }'`
            if [ ! -z $existing ]
            then
              echo "Found an existing container by its name, recovering cidfile, please rerun"
@@ -219,7 +219,7 @@ case "$command" in
              exit 1
            fi
 
-           found=`docker ps -q -a | grep $cid`
+           found=`docker ps -q -a -notrunc | grep $cid`
            if [ -z $found ]
            then
              echo "Invalid cid file, deleting, please re-run"