From a02ebd8290bd6ccc5defe96c1da1e7c15ead30a2 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 22 Feb 2018 10:42:47 +0100 Subject: [PATCH] library/roles/smartgears/smartgears/templates/get-scopes.j2: Request the scopes for the correct hostname. --- smartgears/smartgears/templates/get-scopes.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/smartgears/smartgears/templates/get-scopes.j2 b/smartgears/smartgears/templates/get-scopes.j2 index 349f242d..62e4df4f 100644 --- a/smartgears/smartgears/templates/get-scopes.j2 +++ b/smartgears/smartgears/templates/get-scopes.j2 @@ -66,7 +66,11 @@ function get_scopes_from_auth() { export CLASSPATH="/home/gcube/SmartGears/lib/${jar}:$CLASSPATH" done cd $LOCAL_LIB + {% if hostname is defined %} + java TokenGenerator {{ hostname }} $TOKEN $HTTP_PORT $SCOPES_FILE $SCOPES_LIST >/dev/null 2>&1 + {% else %} java TokenGenerator {{ smartgears_hostname }} $TOKEN $HTTP_PORT $SCOPES_FILE $SCOPES_LIST >/dev/null 2>&1 + {% fi %} RETVAL=$? if [ $RETVAL -eq 0 ] ; then logger "$LOG_PREFIX We got the scope tokens"