|
@@ -0,0 +1,31 @@
|
|
1
|
+#!/bin/bash
|
|
2
|
+# script convert end make ssl sert for https
|
|
3
|
+# info - https://sysadmin.pm/dehydrated-letsencrypt/
|
|
4
|
+#
|
|
5
|
+path_ssl="/etc/ssl/private";
|
|
6
|
+path_certbot="/var/lib/dehydrated/certs";
|
|
7
|
+domains=( "qbpro.ru" "webmail.qbpro.ru" "support.qbpro.ru" );
|
|
8
|
+
|
|
9
|
+function makeSslPem() {
|
|
10
|
+for ((dmn=0; dmn != ${#domains[@]}; dmn++))
|
|
11
|
+ do
|
|
12
|
+ cat $path_certbot/${domains[$dmn]}/cert.pem > $path_ssl/${domains[$dmn]}.pem;
|
|
13
|
+ cat $path_certbot/${domains[$dmn]}/chain.pem >> $path_ssl/${domains[$dmn]}.pem;
|
|
14
|
+ cat $path_certbot/${domains[$dmn]}/fullchain.pem >> $path_ssl/${domains[$dmn]}.pem;
|
|
15
|
+ cat $path_certbot/${domains[$dmn]}/privkey.pem >> $path_ssl/${domains[$dmn]}.pem;
|
|
16
|
+done
|
|
17
|
+}
|
|
18
|
+
|
|
19
|
+function makePemList() {
|
|
20
|
+:>/etc/ssl/crt-list.txt
|
|
21
|
+for ((icrt=0; icrt != ${#domains[@]}; icrt++))
|
|
22
|
+ do
|
|
23
|
+ echo "$path_ssl/${domains[$icrt]}.pem">>/etc/ssl/crt-list.txt
|
|
24
|
+done
|
|
25
|
+}
|
|
26
|
+
|
|
27
|
+## create sets.pem
|
|
28
|
+makeSslPem;
|
|
29
|
+makePemList;
|
|
30
|
+
|
|
31
|
+
|