Explorar el Código

nginx certbot

David hace 10 años
padre
commit
37403aad29
Se han modificado 1 ficheros con 11 adiciones y 0 borrados
  1. 11 0
      scripts/nginx-certbot.sh

+ 11 - 0
scripts/nginx-certbot.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+invalid_domains="KKKKKKKKKKKKKKKKKKKKKKKKKKK"
+domains=$(grep server_name /etc/nginx/sites-enabled/* | cut -d: -f 2 | grep -oP "[a-z.-]+" | sort -u | grep com | grep -vE $invalid_domains | xargs)
+str=""
+for f in ${domains[@]}; do
+    str=$str" -d $f"
+done
+
+certbot certonly --webroot -w /var/www/ssl-proof/ --expand $str
+service nginx reload