changeset 5:c69fd8f97d50

Copy ssl example config prior starting agent. Reviewed-by: ebaron Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-July/024130.html
author Severin Gehwolf <sgehwolf@redhat.com>
date Tue, 18 Jul 2017 18:46:20 +0200
parents 8c2659d0cadf
children 0a17affdae81
files thermostat-ng.sh
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/thermostat-ng.sh	Tue Jul 18 16:03:37 2017 +0200
+++ b/thermostat-ng.sh	Tue Jul 18 18:46:20 2017 +0200
@@ -184,7 +184,7 @@
 npm_build() {
   # setup environment variables
   export NODE_ENV=development
-  export GATEWAY_URL=http://127.0.0.1:30000
+  export GATEWAY_URL
   npm install
   npm run build
 }
@@ -201,6 +201,7 @@
   fi
   echo "username=foo-agent-user" >> $agent_conf
   echo "password=agent-pwd" >> $agent_conf
+  cp $AGENT_ROOT/distribution/target/image/etc/examples/ssl.properties.example $AGENT_ROOT/distribution/target/image/etc/ssl.properties
 }
 
 
@@ -239,7 +240,7 @@
 # Idle loop so as to be able to receive signals
 idle() {
   echo "Thermostat started. Stop with CTRL+C"
-  echo "The web client can be accessed at: http://127.0.0.1:30000/web-client/"
+  echo "The web client can be accessed at: $GATEWAY_URL/web-client/"
   echo "Use credentials 'test-user':'test-pass' to log in."
   while true; do
     sleep 60
@@ -250,6 +251,7 @@
 WEB_GATEWAY_ROOT="${TOP_DIR}/web-gateway"
 AGENT_ROOT="${TOP_DIR}/agent"
 WEB_CLIENT_ROOT="${TOP_DIR}/web-client"
+GATEWAY_URL="https://127.0.0.1:30000"
 
 DO_BUILD=${BUILD:-true}
 RUN_DATA_DIR="$TOP_DIR/data"