File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2519,6 +2519,8 @@ check_for_codeberg_release() {
25192519# ------------------------------------------------------------------------------
25202520create_self_signed_cert () {
25212521 local APP_NAME=" ${1:- ${APPLICATION} } "
2522+ local HOSTNAME=" $( hostname -f) "
2523+ local IP=" $( hostname -I | awk ' {print $1}' ) "
25222524 local APP_NAME_LC=$( echo " ${APP_NAME,,} " | tr -d ' ' )
25232525 local CERT_DIR=" /etc/ssl/${APP_NAME_LC} "
25242526 local CERT_KEY=" ${CERT_DIR} /${APP_NAME_LC} .key"
@@ -2536,8 +2538,8 @@ create_self_signed_cert() {
25362538
25372539 mkdir -p " $CERT_DIR "
25382540 $STD openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 \
2539- -subj " /CN=${APP_NAME } " \
2540- -addext " subjectAltName=DNS:${APP_NAME} " \
2541+ -subj " /CN=${HOSTNAME } " \
2542+ -addext " subjectAltName=DNS:${HOSTNAME} ,DNS:localhost,IP: ${IP} ,IP:127.0.0.1 " \
25412543 -keyout " $CERT_KEY " \
25422544 -out " $CERT_CRT " || {
25432545 msg_error " Failed to create self-signed certificate"
You can’t perform that action at this time.
0 commit comments