From 0d1474ee4011ae7a12401e6ae5ec346fe3cb6dd9 Mon Sep 17 00:00:00 2001 From: kjong Date: Wed, 25 Mar 2020 21:43:38 -0700 Subject: [PATCH 1/3] installed --- modules/services.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/services.sh b/modules/services.sh index be858d47b..7709ad2b3 100644 --- a/modules/services.sh +++ b/modules/services.sh @@ -21,9 +21,7 @@ function services { fi # list all installed services elif [ "$service_name" = "installed" ]; then - if [ "$command" = "full" ]; then - docker ps -a - elif [ -z "$command" ]; then + if [ -z "$command" ]; then available=($(services available)) for service in "${available[@]}" do @@ -31,6 +29,12 @@ function services { echo $service fi done + elif [ "$command" = "full" ]; then + docker ps -a + else + echo "ERROR: unknown command option" + echo "USAGE: $BASENAME services installed " + exit 1 fi # list all running services elif [ "$service_name" = "running" ]; then From 33cdc1e51694f2ead6b8b006a31e760693d1dc40 Mon Sep 17 00:00:00 2001 From: kjong Date: Wed, 25 Mar 2020 21:45:11 -0700 Subject: [PATCH 2/3] running --- modules/services.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/services.sh b/modules/services.sh index 7709ad2b3..5d03f0552 100644 --- a/modules/services.sh +++ b/modules/services.sh @@ -38,9 +38,7 @@ function services { fi # list all running services elif [ "$service_name" = "running" ]; then - if [ "$command" = "full" ]; then - docker ps - elif [ -z "$command" ]; then + if [ -z "$command" ]; then running=$(docker ps --format '{{.Names}}') array=($running) results="" @@ -56,6 +54,12 @@ function services { results+=" " done echo ${results} | tr ' ' '\n' | uniq | xargs + elif [ "$command" = "full" ]; then + docker ps + else + echo "ERROR: unknown command option" + echo "USAGE: $BASENAME services running " + exit 1 fi # list all ports used by services elif [ "$service_name" = "ports" ]; then From 58e2b89e75aad429ccb331d252c9d5a2a035e4d1 Mon Sep 17 00:00:00 2001 From: dogi Date: Thu, 26 Mar 2020 03:11:58 -0400 Subject: [PATCH 3/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d12a3cd37..0ae79f9df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@treehouses/cli", - "version": "1.16.21", + "version": "1.16.22", "remote": "2251", "description": "Thin command-line interface for Raspberry Pi low level configuration.", "main": "cli.sh",