|
@@ -37,6 +37,7 @@ HOSTNAME=
|
37
|
37
|
PROVIDER='startssl'
|
38
|
38
|
DH_KEYLENGTH=2048
|
39
|
39
|
LETSENCRYPT_SERVER='https://acme-v01.api.letsencrypt.org/directory'
|
|
40
|
+INSTALL_DIR=/root/build
|
40
|
41
|
|
41
|
42
|
function show_help {
|
42
|
43
|
echo ''
|
|
@@ -54,20 +55,14 @@ function show_help {
|
54
|
55
|
function renew_letsencrypt {
|
55
|
56
|
if [ ! -f /etc/letsencrypt/live/${HOSTNAME}/fullchain.pem ]; then
|
56
|
57
|
echo $"Adding Let's Encrypt certificate"
|
57
|
|
- ${PROJECT_NAME}-addcert -e $HOSTNAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
|
58
|
|
- if [ ! "$?" = "0" ]; then
|
59
|
|
- echo $"Unable to add Let's encrypt certificate"
|
60
|
|
- exit 6328
|
61
|
|
- fi
|
62
|
58
|
else
|
63
|
59
|
echo $"Renewing Let's Encrypt certificate"
|
64
|
|
- letsencrypt renew \
|
65
|
|
- --cert-path /etc/letsencrypt/live/${HOSTNAME}/fullchain.pem \
|
66
|
|
- --key-path /etc/letsencrypt/live/${HOSTNAME}/privkey.pem
|
67
|
|
- if [ ! "$?" = "0" ]; then
|
68
|
|
- echo $"Unable to renew Let's encrypt certificate"
|
69
|
|
- exit 2624
|
70
|
|
- fi
|
|
60
|
+ fi
|
|
61
|
+
|
|
62
|
+ ${PROJECT_NAME}-addcert -e $HOSTNAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH
|
|
63
|
+ if [ ! "$?" = "0" ]; then
|
|
64
|
+ echo $"Unable to add Let's encrypt certificate"
|
|
65
|
+ exit 6328
|
71
|
66
|
fi
|
72
|
67
|
|
73
|
68
|
# Ensure that links are in place
|