forked from ISTI-ansible-roles/ansible-roles
31 lines
732 B
Django/Jinja
31 lines
732 B
Django/Jinja
#!/bin/bash
|
|
|
|
DESTFILE={{ smartgears_user_home }}/.containerxml/2-container.xml
|
|
TOKEN=
|
|
|
|
{%if setup_nginx %}
|
|
{%if https_port is defined %}
|
|
{% if http_redirect_to_https is defined and http_redirect_to_https %}
|
|
HTTP_PORT={{ https_port }}
|
|
{% else %}
|
|
HTTP_PORT={{ http_port }}
|
|
{% endif %}
|
|
{% else %}
|
|
{%if http_port is defined %}
|
|
HTTP_PORT={{ http_port }}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% else %}
|
|
HTTP_PORT={{ item.http_port }}
|
|
{% endif %}
|
|
|
|
for jar in $( ls -1 /home/gcube/tomcat/lib/ ) ; do
|
|
export CLASSPATH="/home/gcube/SmartGears/lib/${jar}:$CLASSPATH"
|
|
done
|
|
|
|
cd /usr/local/lib
|
|
|
|
java TokenGenerator {{ smartgears_hostname }} {{ gcube_admin_token }} $HTTP_PORT $DESTFILE {% for scope in smartgears_scopes %}{{ scope }} {% endfor %}
|
|
|
|
exit 0
|