Skip to content

Commit 7f0b177

Browse files
committed
save refeshed certs to new dir
1 parent 9967087 commit 7f0b177

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

4a-install-tls-self-signed-nginx.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ PROXY_SITE=
5050
CERT_DAYS=
5151
DEFAULT_IP=
5252

53+
# Create a place to save the certs so we don't overwrite any earlier versions
54+
CERT_DIR_NAME=tls-certs-$(date +%y.%m.%d-%H_%M)
55+
CERT_DIR=$DOWNLOAD_DIR/$CERT_DIR_NAME
56+
mkdir -p $CERT_DIR
57+
cd $CERT_DIR
58+
5359
# Setup script cmd line arguments for proxy site and certificate days
5460
TLSNAME=$1
5561
TLSDAYS=$2

guac-management/refresh-tls-self-signed.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ echo
3535
echo -e "${LGREEN}Cresting self signed TLS certificates for Nginx...${GREY}"
3636
echo
3737

38+
# Create a place to save the certs so we don't overwrite any earlier versions
3839
USER_HOME_DIR=$(eval echo ~${SUDO_USER})
39-
CERT_DIR=tls-certs-$(date +%y.%m.%d-%H_%M)
40-
WORKING_DIR=$USER_HOME_DIR/guac-setup/$CERT_DIR
41-
mkdir -p $WORKING_DIR
42-
cd $WORKING_DIR
40+
CERT_DIR_NAME=tls-certs-$(date +%y.%m.%d-%H_%M)
41+
CERT_DIR=$USER_HOME_DIR/guac-setup/$CERT_DIR_NAME
42+
mkdir -p $CERT_DIR
43+
cd $CERT_DIR
4344

4445
# Set default certificate file destinations. Change these for other TLS applications.
4546
DIR_SSL_KEY="/etc/nginx/ssl/private"

0 commit comments

Comments
 (0)