0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-11-04 15:08:59 +01:00
dendrite/docker/build.sh
mujx 1bcb673e3c Set up a development environment with docker (#387)
Signed-off-by: Konstantinos Sideris <sideris.konstantin@gmail.com>
2018-01-02 18:26:37 +00:00

18 lines
557 B
Bash

#!/bin/bash
gb build
# Generate the keys if they don't already exist.
if [ ! -f server.key ] || [ ! -f server.crt ] || [ ! -f matrix_key.pem ]; then
echo "Generating keys ..."
rm -f server.key server.crt matrix_key.pem
test -f server.key || openssl req -x509 -newkey rsa:4096 \
-keyout server.key \
-out server.crt \
-days 3650 -nodes \
-subj /CN=localhost
test -f matrix_key.pem || /build/bin/generate-keys -private-key matrix_key.pem
fi