summary refs log tree commit diff
path: root/bin/docker-gcp
diff options
context:
space:
mode:
authorFranck Cuny <franck.cuny@gmail.com>2016-11-22 08:45:02 -0800
committerFranck Cuny <franck.cuny@gmail.com>2016-11-22 08:45:02 -0800
commit5a744ba106be42e3924df5fdc43a7f0b38becdd2 (patch)
tree546fb5b6ef331aa20808a502d3be19f30403bec5 /bin/docker-gcp
parent[bin] Dummy script to prettify JSON output. (diff)
downloademacs.d-5a744ba106be42e3924df5fdc43a7f0b38becdd2.tar.gz
[bin] Add tmux-status to the docker-gcp script.
Diffstat (limited to '')
-rwxr-xr-xbin/docker-gcp9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/docker-gcp b/bin/docker-gcp
index 3136fee..5aa9c2a 100755
--- a/bin/docker-gcp
+++ b/bin/docker-gcp
@@ -6,7 +6,7 @@ DOCKER_MACHINE_NAME=${2:-gcp}
 COMMAND=$1
 
 usage() {
-  echo "$0: [create|start|stop|status]" >&2
+  echo "$0: [create|start|stop|status|ssh|scp|tmux-status]" >&2
   exit 1
 }
 
@@ -38,6 +38,10 @@ __scp() {
   exit 2
 }
 
+__tmux-status() {
+  [ $(__status) == 'Running' ] && echo "Docker GCP up"
+}
+
 if [[ -z "${COMMAND}" ]]; then
   usage
 fi
@@ -61,6 +65,9 @@ case "${COMMAND}" in
   scp)
     __scp
     ;;
+  tmux-status)
+    __tmux-status
+    ;;
   *)
     usage
     ;;