1
1
#! /usr/bin/env bash
2
2
# shellcheck shell=bash
3
3
4
- # This is a script that sets up an entire defguard instance (including core,
4
+ # This is a script that sets up an entire Defguard instance (including core,
5
5
# gateway, enrollment proxy and reverse proxy). It's goal is to prepare
6
6
# a working instance by running a single command.
7
7
@@ -261,7 +261,7 @@ print_header() {
261
261
_EOF_
262
262
echo -e " ${C_END} "
263
263
echo
264
- echo " defguard docker-compose deployment setup script v${VERSION} "
264
+ echo " Defguard docker-compose deployment setup script v${VERSION} "
265
265
echo -e " Copyright (C) 2023-2024 ${C_BOLD} teonite${C_END} <${C_BG_GREY}${C_YELLOW} https://teonite.com${C_END} >"
266
266
echo
267
267
}
@@ -278,7 +278,7 @@ print_usage() {
278
278
echo
279
279
echo -e " \t--help this help message"
280
280
echo -e " \t--non-interactive run in non-interactive mode - !REQUIRES SETTING all options/env vars"
281
- echo -e " \t--domain <domain> domain where defguard web UI will be available"
281
+ echo -e " \t--domain <domain> domain where Defguard web UI will be available"
282
282
echo -e " \t--enrollment-domain <domain> domain where enrollment service will be available"
283
283
echo -e " \t--use-https configure reverse proxy to use HTTPS"
284
284
echo -e " \t--volume <directory> Docker volumes directory - default: ${VOLUME_DIR} "
@@ -491,7 +491,7 @@ load_configuration_from_input() {
491
491
echo -ne " ${C_ITALICS}${C_LBLUE} "
492
492
cat << _EOF_
493
493
494
- Please provide the values to configure your defguard instance. If you've
494
+ Please provide the values to configure your Defguard instance. If you've
495
495
already configured some options by setting environment variables or through
496
496
CLI options, those will be used as defaults.
497
497
@@ -504,7 +504,7 @@ echo -ne "${C_GREY}"
504
504
cat << _EOF_
505
505
506
506
Choose domains that will be used to expose your instance through Caddy
507
- reverse proxy. defguard uses a separate domain for the Web UI, and for
507
+ reverse proxy. Defguard uses a separate domain for the Web UI, and for
508
508
the optional enrollment/desktop client configuration/password reset
509
509
service.
510
510
@@ -530,7 +530,7 @@ _EOF_
530
530
531
531
while [ X${domain} = " X" ]; do
532
532
echo -ne " ${C_YELLOW}${TXT_INPUT}${C_END} "
533
- read -p " Enter defguard domain [default: ${CFG_DOMAIN} ]: " domain
533
+ read -p " Enter Defguard domain [default: ${CFG_DOMAIN} ]: " domain
534
534
if [ " $domain " ]; then
535
535
CFG_DOMAIN=" $domain "
536
536
fi
@@ -644,7 +644,7 @@ validate_required_variables() {
644
644
}
645
645
646
646
generate_external_urls () {
647
- # prepare full defguard URL
647
+ # prepare full Defguard URL
648
648
if [ $CFG_USE_HTTPS ]; then
649
649
CFG_DEFGUARD_URL=" https://${CFG_DOMAIN} "
650
650
else
@@ -664,7 +664,7 @@ generate_external_urls() {
664
664
665
665
print_config () {
666
666
echo
667
- echo " ${TXT_BEGIN} Setting up your defguard instance with following config:"
667
+ echo " ${TXT_BEGIN} Setting up your Defguard instance with following config:"
668
668
echo
669
669
echo -e " ${TXT_SUB} data volume: ${C_BOLD}${VOLUME_DIR}${C_END} "
670
670
echo
@@ -716,7 +716,7 @@ generate_certs() {
716
716
# TODO: allow configuring CA parameters
717
717
openssl req -x509 -new -nodes -key ${SSL_DIR} /defguard-ca.key -sha256 -days 1825 -out ${SSL_DIR} /defguard-ca.pem -passin pass:" ${PASSPHRASE} " -subj " /C=PL/ST=Zachodniopomorskie/L=Szczecin/O=Example/OU=IT Department/CN=${CFG_DOMAIN} " 2>&1 >> ${LOG_FILE}
718
718
719
- # generate CA-signed certificate for defguard gRPC
719
+ # generate CA-signed certificate for Defguard gRPC
720
720
openssl genrsa -out ${SSL_DIR} /defguard-grpc.key 2048 2>&1 >> ${LOG_FILE}
721
721
722
722
openssl req -new -key ${SSL_DIR} /defguard-grpc.key -out ${SSL_DIR} /defguard-grpc.csr -subj " /C=PL/ST=Zachodniopomorskie/L=Szczecin/O=Example/OU=IT Department/CN=${CFG_DOMAIN} " 2>&1 >> ${LOG_FILE}
733
733
openssl x509 -req -in ${SSL_DIR} /defguard-grpc.csr -CA ${SSL_DIR} /defguard-ca.pem -CAkey ${SSL_DIR} /defguard-ca.key -passin pass:" ${PASSPHRASE} " -CAcreateserial \
734
734
-out ${SSL_DIR} /defguard-grpc.crt -days 1000 -sha256 -extfile ${SSL_DIR} /defguard-grpc.ext 2>&1 >> ${LOG_FILE}
735
735
736
- # generate CA-signed certificate for defguard proxy gRPC
736
+ # generate CA-signed certificate for Defguard proxy gRPC
737
737
openssl genrsa -out ${SSL_DIR} /defguard-proxy-grpc.key 2048 2>&1 >> ${LOG_FILE}
738
738
739
739
openssl req -new -key ${SSL_DIR} /defguard-proxy-grpc.key -out ${SSL_DIR} /defguard-proxy-grpc.csr -subj " /C=PL/ST=Zachodniopomorskie/L=Szczecin/O=Example/OU=IT Department/CN=${CFG_DOMAIN} " 2>&1 >> ${LOG_FILE}
@@ -910,9 +910,9 @@ enable_vpn_gateway() {
910
910
911
911
print_instance_summary () {
912
912
echo
913
- echo -e " ${C_LGREEN} ${TXT_CHECK} defguard setup finished successfully${C_END} . The Docker image version used for the setup was: ${IMAGE_TYPE_NAME} "
913
+ echo -e " ${C_LGREEN} ${TXT_CHECK} Defguard setup finished successfully${C_END} . The Docker image version used for the setup was: ${IMAGE_TYPE_NAME} "
914
914
echo
915
- echo " If your DNS configuration is correct your defguard instance should be available at:"
915
+ echo " If your DNS configuration is correct your Defguard instance should be available at:"
916
916
echo
917
917
echo -e " \t${TXT_SUB} Web UI: ${C_BOLD}${CFG_DEFGUARD_URL}${C_END} "
918
918
if [ " $CFG_ENABLE_ENROLLMENT " ]; then
0 commit comments