diff scripts/updates-apply.sh @ 264:3754be907d9b production vv2.1.0

flow: Merged <release> 'v2.1.0' to <master> ('production').
author aldrich@nwoca.org
date Thu, 26 Jul 2018 14:27:43 +0100
parents 6aecbb32c587
children
line wrap: on
line diff
--- a/scripts/updates-apply.sh	Thu Jan 11 18:32:51 2018 +0000
+++ b/scripts/updates-apply.sh	Thu Jul 26 14:27:43 2018 +0100
@@ -12,7 +12,7 @@
 #
 # examples:
 #   /ssdt/apply-updates.sh /data/preview
-#   /ssdt/apply-updates.sh /data/preview usps
+#   /ssdt/apply-updates.sh /data/preview uspsapp
 #
 
 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh"
@@ -34,12 +34,15 @@
       read  container eol <<< $line
       if [[ $container == *_1 ]]
       then
-        t=(${container//_/ })
-        service=${t[1]}
-        if [[ $service == $SERVICE ]]
+        if [[ $eol =~ "Up" ]]
         then
-           echo -e "\n$project: Updating $service"
-           docker-compose up -d $service
+           t=(${container//_/ })
+           service=${t[1]}
+           if [[ $service == $SERVICE ]]
+           then
+             echo -e "\n$project: Updating $service"
+             docker-compose up -d $service
+           fi
         fi
       fi
    done < <(docker-compose ps)