Correction : vm_{hosted,remote} : chemins et noms .
[lhc/ateliers.git] / etc / nginx / site.d / lhc-www-tls / configure.sh
diff --git a/etc/nginx/site.d/lhc-www-tls/configure.sh b/etc/nginx/site.d/lhc-www-tls/configure.sh
new file mode 100644 (file)
index 0000000..50f5f51
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e -f -u -x
+sudo rmdir ~www-data/"$site" || true
+sudo ln -fns "${site%-tls}" ~www-data/"$site"
+local hint="run vm_remote nginx_key_send before"
+assert "sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint
+sudo install -m 664 -o www -g www \
+ "$tool"/var/pub/x509/www.heureux-cyclage.org/crt+ca.pem \
+ /etc/nginx/x509.d/"$site"/crt.pem