diff --git a/support-services/docker-entrypoint.d/04-upload-thesauri.sh b/support-services/docker-entrypoint.d/04-upload-thesauri.sh index a0f7a544fc..e3917736a0 100755 --- a/support-services/docker-entrypoint.d/04-upload-thesauri.sh +++ b/support-services/docker-entrypoint.d/04-upload-thesauri.sh @@ -6,6 +6,9 @@ xsrf_token=$(cat /xsrf_token) echo "Uploading thesauri to GeoNetwork..." +# we're waiting a bit here for GN to be ready to accept thesauri (i.e. the default ones are set up) +sleep 4 + for f in /docker-entrypoint.d/thesauri/*.rdf do curl -s "http://$host/geonetwork/srv/api/registries/vocabularies" \ @@ -19,12 +22,12 @@ do done # this shows the registered thesauri in GN -#curl "http://$host/geonetwork/srv/fre/thesaurus?_content_type=json" \ -# -H 'Accept: application/json, text/plain, */*' \ -# -H 'Content-Type: multipart/form-data' \ -# -H 'Accept: application/json, text/plain, */*' \ -# -H "Cookie: JSESSIONID=$jsessionid; XSRF-TOKEN=$xsrf_token" \ -# -H "X-XSRF-TOKEN: $xsrf_token" -#echo "" +curl -s --no-progress-meter "http://$host/geonetwork/srv/fre/thesaurus?_content_type=json" \ + -H 'Accept: application/json, text/plain, */*' \ + -H 'Content-Type: multipart/form-data' \ + -H 'Accept: application/json, text/plain, */*' \ + -H "Cookie: JSESSIONID=$jsessionid; XSRF-TOKEN=$xsrf_token" \ + -H "X-XSRF-TOKEN: $xsrf_token" +echo "" echo "Thesauri uploaded to GeoNetwork."