Adds new command line option to skip pre-requisites. This was causing
authorRobin Ward <robin.ward@gmail.com>
Thu, 10 Apr 2014 20:54:59 +0000 (16:54 -0400)
committerRobin Ward <robin.ward@gmail.com>
Thu, 10 Apr 2014 20:54:59 +0000 (16:54 -0400)
discourse-droplet to hang.

launcher

index 8856ce24559b324245b9e0f7796eb85639a10d1c..7b67f39281408066d1d3c795788b20ab7b38a9eb 100755 (executable)
--- a/launcher
+++ b/launcher
@@ -2,6 +2,9 @@
 
 command=$1
 config=$2
+opt=$3
+
+
 config_file=containers/"$config".yml
 cidfile=cids/"$config".cid
 cidbootstrap=cids/"$config"_boostrap.cid
@@ -17,7 +20,7 @@ docker_ip=`/sbin/ifconfig | \
 
 
 usage () {
-  echo "Usage: launcher COMMAND CONFIG"
+  echo "Usage: launcher COMMAND CONFIG [--skip-prereqs]"
   echo "Commands:"
   echo "    start:      Start/initialize a container"
   echo "    stop:       Stop a running container"
@@ -27,6 +30,9 @@ usage () {
   echo "    logs:       Docker logs for container"
   echo "    bootstrap:  Bootstrap a container for the config based on a template"
   echo "    rebuild:    Rebuild a container (destroy old, bootstrap, start new)"
+  echo
+  echo "Options:"
+  echo "    --skip-prereqs   Don't check prerequisites"
   exit 1
 }
 
@@ -69,7 +75,9 @@ prereqs() {
   fi
 }
 
-prereqs
+if [ "$opt" != "--skip-prereqs" ] ; then
+  prereqs
+fi
 
 get_ssh_pub_key() {
   if tty -s ; then