Skip to content

Commit

Permalink
Basic sanity check of openssl config file in initial install script
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcOverIP committed Sep 11, 2023
1 parent a4d290e commit 3551ba7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions initial-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ if [ ! -f $1 ];then
exit 1
fi >> $LOGFILE 2>&1


echo "[*] Doing basic sanity check of openssl config file." | tee -a $LOGFILE
grep -E "MODIFYME|dnsnameofyourredelkserver|someseconddnsname" $1 | grep -v "^#" >> $LOGFILE 2>&1
ERROR=$?
if [ $ERROR -ne 0 ]; then
echoerror "[X] Check your openssl config file, it fails basic sanity checks. (Error Code: $ERROR)."
exit 1
fi

echo ""
echo "[*] Will generate TLS certificates for the following DNS names and/or IP addresses:" | tee -a $LOGFILE
grep -E "^DNS\.|^IP\." certs/config.cnf
Expand Down

0 comments on commit 3551ba7

Please sign in to comment.