library/roles/smartgears/smartgears/templates/get-scopes.j2: Request the scopes for the correct hostname.

This commit is contained in:
Andrea Dell'Amico 2018-02-22 10:42:47 +01:00
parent 43ea30055d
commit a02ebd8290
1 changed files with 4 additions and 0 deletions

View File

@ -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"