diff --git a/smartgears/smartgears/templates/get-scopes.j2 b/smartgears/smartgears/templates/get-scopes.j2 index 349f242..62e4df4 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"