#!/bin/sh # Generate from database (exported XML from the website) the part of nginx # configuration file authenticating teams curl http://localhost/admin/teams/export 2> /dev/null | grep "(.*)<.*$@ if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=\2/") { set $team \1; }@'