File tree Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ setup_global () {
11
11
gomplate \
12
12
-o ${SSL_GLOBAL_CFG} \
13
13
-f ${TEMPLATES} /global.conf.tmpl
14
- _done
14
+ _ok " - done. "
15
15
fi
16
16
17
17
if [ ! -f ${SSL_DHPARAM} ] ; then
18
18
_echo " - generating dhparam..."
19
19
openssl dhparam -out ${SSL_DHPARAM} ${SSL_DHPARAM_BITS}
20
- _done
20
+ _ok " - done. "
21
21
fi
22
22
23
23
}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ setup_nginx () {
16
16
local FILE=${SITES} /${DOMAIN_NAME}
17
17
18
18
# check for existing configuration
19
- [[ -f ${FILE} ]] && return 0 || _echo " - nginx... "
19
+ [[ -f ${FILE} ]] && _ok " - already set up. " && return 0
20
20
21
21
# build domain list and remove trailing / multiple spaces between domains
22
22
TMP=" ${DOMAIN_NAME} $( printf " %s" ${DOMAIN_ALIASES[@]} ) "
@@ -27,4 +27,6 @@ setup_nginx () {
27
27
-o ${FILE} \
28
28
-f ${TEMPLATES} /site.conf.tmpl
29
29
30
+ _ok " - done."
31
+
30
32
}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ setup_ssl () {
33
33
local FILE=${SSL_CERTS} /${DOMAIN_NAME} /${GETSSL_CFG}
34
34
35
35
# check for existing configuration
36
- [[ -f ${FILE} ]] && return 0 || _echo " - SSL... "
36
+ [[ -f ${FILE} ]] && _ok " - already set up. " && return 0
37
37
38
38
# -U stop upgrade checks
39
39
# -w set working directory
@@ -56,5 +56,8 @@ setup_ssl () {
56
56
# create self-signed certificate so nginx will start before we request proper certificates
57
57
generate_temp_cert ${CERT} /fullchain.crt ${CERT} .key ${DOMAIN_NAME}
58
58
generate_temp_cert ${CERT} /chain.crt ${CERT} /chain.key ${DOMAIN_NAME}
59
+ rm ${CERT} /chain.key
60
+
61
+ _ok " - done."
59
62
60
63
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ source ${INC}/setup-ssl.sh
21
21
# Set up global SSL configuration
22
22
#======================================================================================================================
23
23
24
- _echo "Setting up getssl environment ..."
24
+ _echo "Setting up getssl..."
25
25
setup_global
26
26
_done
27
27
@@ -32,11 +32,14 @@ _done
32
32
33
33
_echo "Setting up domains..."
34
34
for D in "${!DOMAINS[@]}" ; do
35
- _echo " - ${D}"
36
35
U=${DOMAINS[$D]} # upstream server
37
36
A=(${ALIASES[${D}]}) # domain aliases
37
+
38
+ _echo " - ${D}: Nginx..."
38
39
setup_nginx ${D} ${U} A
40
+
41
+ _echo " - ${D}: SSL..."
39
42
setup_ssl ${D} A
40
- _ok " - done."
43
+ _ok " - ${D} done."
41
44
done
42
45
_done
Original file line number Diff line number Diff line change @@ -16,6 +16,6 @@ source ${INC}/check.sh
16
16
_echo "Requesting SSL certificates..."
17
17
for D in "${!DOMAINS[@]}" ; do
18
18
_echo " - ${D}"
19
- /etc/ssl/getssl -U -w ${SSL_CERTS} ${D} || _error "Unable to request certificate for ${D}."
19
+ /etc/ssl/getssl -U -w ${SSL_CERTS} ${D} || _error " - unable to request certificate for ${D}."
20
20
done
21
21
_done
You can’t perform that action at this time.
0 commit comments