110d6eb1f62b821eaf1b24e1a43f00f7c4edea2a
[lhc/ateliers.git] / etc / nginx / site.d / lhc-stats-tls / configure.sh
1 #!/bin/sh
2 set -e -f -u -x
3 local hint="run vm_remote nginx_configure before"
4 assert "sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint
5 sudo install -m 664 -o www -g www \
6 "$tool"/var/pub/x509/stats.heureux-cyclage.org/crt+ca.pem \
7 /etc/nginx/x509.d/"$site"/crt.pem
8
9 sudo rmdir ~www-data/"$site" || true
10 sudo ln -fns "${site%-tls}" ~www-data/"$site"
11