File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ RED=' \033[0;31m'
3
+ GREEN=' \033[0;32m'
4
+ YELLOW=' \033[1;33m'
5
+ NC=' \033[0m' # No Color
6
+
7
+ OUTPUT=/folder/icecast.pem
8
+
9
+ echo -e " ${YELLOW} Getting Cert and PrivKey from certbot${NC} "
10
+ echo " "
11
+
12
+ CERT=/etc/letsencrypt/live/< domain> /cert.pem
13
+ if test -f " $CERT " ;
14
+ then
15
+ echo -e " ${GREEN} $CERT exist !${NC} "
16
+ echo " "
17
+ else
18
+ echo -e " ${RED} $CERT doesn't exist !${NC} "
19
+ exit
20
+ fi
21
+
22
+ PRIVKEY=/etc/letsencrypt/live/< domain> /privkey.pem
23
+ if test -f " $PRIVKEY " ;
24
+ then
25
+ echo -e " ${GREEN} $PRIVKEY exist !${NC} "
26
+ echo " "
27
+ else
28
+ echo -e " ${RED} $PRIVKEY doesn't exist !${NC} "
29
+ exit
30
+ fi
31
+
32
+ # CONCATENATING (Yes, that simple...but safe !)
33
+ cat $CERT $PRIVKEY > $OUTPUT
34
+
35
+ if test -f " $OUTPUT " ;
36
+ then
37
+ echo -e " ${GREEN} $OUTPUT OK !${NC} "
38
+ exit
39
+ else
40
+ echo -e " ${RED} Output to $OUTPUT error !${NC} (permission problem ?)"
41
+ exit
42
+ fi
You can’t perform that action at this time.
0 commit comments