Skip to content

Commit ca47165

Browse files
committed
web: move key generation to the main config script
1 parent 415f104 commit ca47165

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

web/rootfs/etc/cont-init.d/10-config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ mkdir -p \
77
/var/lib/nginx/tmp/client_body \
88
/var/tmp/nginx
99

10+
# generate keys (maybe)
11+
if [[ -f /config/keys/cert.key && -f /config/keys/cert.crt ]]; then
12+
echo "using keys found in /config/keys"
13+
else
14+
echo "generating self-signed keys in /config/keys, you can replace these with your own keys if required"
15+
SUBJECT="/C=US/ST=TX/L=Austin/O=jitsi.org/OU=Jitsi Server/CN=*"
16+
openssl req -new -x509 -days 3650 -nodes -out /config/keys/cert.crt -keyout /config/keys/cert.key -subj "$SUBJECT"
17+
fi
18+
1019
# copy config files
1120
if [[ ! -f /config/nginx/nginx.conf ]]; then
1221
cp /defaults/nginx.conf /config/nginx/nginx.conf

web/rootfs/etc/cont-init.d/20-keygen

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)