Skip to content

Commit f44783f

Browse files
authored
Add entrypoint.sh for OL10 httpd (#3032)
1 parent 979b401 commit f44783f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
set -eu pipefail
4+
5+
SERVER_CERT="$CERTIFICATE_DIR/fullchain.pem"
6+
SERVER_KEY="$KEY_DIR/privkey.pem"
7+
8+
if [ ! -f "$SERVER_KEY" ]; then
9+
echo "Generating certificate private key for SSL support" 1>&2
10+
openssl genpkey -algorithm RSA -out "$SERVER_KEY" 1>&2
11+
fi
12+
13+
if [ ! -f "$SERVER_CERT" ]; then
14+
echo "Generating self-signed certificate for SSL support" 1>&2
15+
openssl req -x509 -new -nodes -key "$SERVER_KEY" -sha256 -days 3650 -out "$SERVER_CERT" -subj "/C=US/ST=California/L=San Francisco/O=Test Company/CN=localhost" 1>&2
16+
fi
17+
18+
httpd -DFOREGROUND

0 commit comments

Comments
 (0)