File tree Expand file tree Collapse file tree 5 files changed +8
-20
lines changed
Expand file tree Collapse file tree 5 files changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ UWSGI_LISTEN=100
2727# Additional
2828SSL_CERT_MODE = SelfSigned
2929TZ = UTC
30- CERT_ADMIN_EMAIL = example@example.org
3130DJANGO_LANGUAGE_CODE = en-gb
3231DB_NAME = openwisp
3332INFLUXDB_NAME = openwisp
Original file line number Diff line number Diff line change @@ -117,8 +117,8 @@ setup_docker_openwisp() {
117117 echo -ne ${GRN} " (4/5) Site manager email: " ${NON}
118118 read django_default_email
119119 # SSL Configuration
120- echo -ne ${GRN} " (5/5) Enter letsencrypt email (leave blank for self-signed certificate ): " ${NON}
121- read letsencrypt_email
120+ echo -ne ${GRN} " (5/5) Use Let's Encrypt SSL? (y/N, blank for no ): " ${NON}
121+ read use_letsencrypt
122122 else
123123 cp $env_path $ENV_USER & >> $LOG_FILE
124124 fi
@@ -161,11 +161,11 @@ setup_docker_openwisp() {
161161 python3 $INSTALL_PATH /build.py change-secret-key > /dev/null
162162 python3 $INSTALL_PATH /build.py change-database-credentials > /dev/null
163163 # SSL Configuration
164- set_env " CERT_ADMIN_EMAIL" " $letsencrypt_email "
165- if [[ -z " $letsencrypt_email " ]]; then
166- set_env " SSL_CERT_MODE" " SelfSigned"
167- else
164+ use_letsencrypt_lower=$( echo " $use_letsencrypt " | tr ' [:upper:]' ' [:lower:]' )
165+ if [[ " $use_letsencrypt_lower " == " y" || " $use_letsencrypt_lower " == " yes" ]]; then
168166 set_env " SSL_CERT_MODE" " Yes"
167+ else
168+ set_env " SSL_CERT_MODE" " SelfSigned"
169169 fi
170170 # Other
171171 hostname=$( echo " $django_default_email " | cut -d @ -f 2)
Original file line number Diff line number Diff line change @@ -72,14 +72,6 @@ properly on your system.
7272 <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones> `__.
7373- **Default: ** ``UTC ``.
7474
75- ``CERT_ADMIN_EMAIL ``
76- ~~~~~~~~~~~~~~~~~~~~
77-
78- - **Explanation: ** Required by certbot. Email used for registration and
79- recovery contact.
80- - **Valid Values: ** A comma separated list of valid email addresses.
81- - **Default: ** ``example@example.com ``.
82-
8375``SSL_CERT_MODE ``
8476~~~~~~~~~~~~~~~~~
8577
Original file line number Diff line number Diff line change @@ -32,14 +32,12 @@ function create_prod_certs {
3232 if [ ! -f /etc/letsencrypt/live/${DASHBOARD_DOMAIN} /privkey.pem ]; then
3333 certbot certonly --standalone --noninteractive --agree-tos \
3434 --rsa-key-size 4096 \
35- --domain ${DASHBOARD_DOMAIN} \
36- --email ${CERT_ADMIN_EMAIL}
35+ --domain ${DASHBOARD_DOMAIN}
3736 fi
3837 if [ ! -f /etc/letsencrypt/live/${API_DOMAIN} /privkey.pem ]; then
3938 certbot certonly --standalone --noninteractive --agree-tos \
4039 --rsa-key-size 4096 \
41- --domain ${API_DOMAIN} \
42- --email ${CERT_ADMIN_EMAIL}
40+ --domain ${API_DOMAIN}
4341 fi
4442}
4543
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ ENV MODULE_NAME=nginx \
2626 DOLLAR=$ \
2727 TZ=UTC \
2828 SSL_CERT_MODE=Yes \
29- CERT_ADMIN_EMAIL=example@example.com \
3029 NGINX_HTTP2=http2 \
3130 NGINX_CLIENT_BODY_SIZE=30 \
3231 NGINX_ADMIN_ALLOW_NETWORK=all \
You can’t perform that action at this time.
0 commit comments