server/nginx_gen_team.sh

4 lines
215 B
Bash
Raw Normal View History

2014-01-21 02:08:08 +00:00
#!/bin/sh
curl http://localhost/admin/teams/export 2> /dev/null | grep "<name id" | sed -E 's@^.*id="([0-9]+)".*>(.*)<.*$@ if ($ssl_client_s_dn ~ "/C=FR/ST=France/O=Epita/OU=SRS/CN=\2/") { set $team \1; }@'