X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=etc%2Fnginx%2Fsite.d%2Flhc-stats-tls%2Flocal.sh;fp=etc%2Fnginx%2Fsite.d%2Flhc-stats-tls%2Flocal.sh;h=da52d3333336b6905ef3ae0c98dc0ec1be5c05dc;hb=3ad6118386977e346d81042e924e5db9c5f15b7d;hp=0000000000000000000000000000000000000000;hpb=22f04b9fac14adc3d3fc98273ba126c3a51792c3;p=lhc%2Fateliers.git diff --git a/etc/nginx/site.d/lhc-stats-tls/local.sh b/etc/nginx/site.d/lhc-stats-tls/local.sh new file mode 100644 index 0000000..da52d33 --- /dev/null +++ b/etc/nginx/site.d/lhc-stats-tls/local.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -e -f -u -x +local hint="run before: ./vm_remote runit_configure nginx -- $site" +assert "sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint +sudo install -m 664 -o www -g www \ + "$tool"/var/pub/x509/stats.heureux-cyclage.org/crt+ca.pem \ + /etc/nginx/x509.d/"$site"/crt.pem + +sudo rmdir ~www-data/"$site" || true +sudo ln -fns "${site%-tls}" ~www-data/"$site" +