File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change
1
+ In start_for_complement.sh, replace some external program calls with shell builtins.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ echo " Args: $*"
9
9
echo " Env: SYNAPSE_COMPLEMENT_DATABASE=$SYNAPSE_COMPLEMENT_DATABASE SYNAPSE_COMPLEMENT_USE_WORKERS=$SYNAPSE_COMPLEMENT_USE_WORKERS SYNAPSE_COMPLEMENT_USE_ASYNCIO_REACTOR=$SYNAPSE_COMPLEMENT_USE_ASYNCIO_REACTOR "
10
10
11
11
function log {
12
- d=$( date + " % Y-%m-%d %H:%M:%S,%3N " )
12
+ d=$( printf ' %(% Y-%m-%d %H:%M:%S)T,%.3s\n ' ${EPOCHREALTIME / . / } )
13
13
echo " $d $* "
14
14
}
15
15
103
103
# Note that both the key and certificate are in PEM format (not DER).
104
104
105
105
# First generate a configuration file to set up a Subject Alternative Name.
106
- cat > /conf/server.tls.conf << EOF
106
+ echo " \
107
107
.include /etc/ssl/openssl.cnf
108
108
109
109
[SAN]
110
- subjectAltName=DNS:${SERVER_NAME}
111
- EOF
110
+ subjectAltName=DNS:${SERVER_NAME} " > /conf/server.tls.conf
112
111
113
112
# Generate an RSA key
114
113
openssl genrsa -out /conf/server.tls.key 2048
@@ -123,8 +122,8 @@ openssl x509 -req -in /conf/server.tls.csr \
123
122
-out /conf/server.tls.crt -extfile /conf/server.tls.conf -extensions SAN
124
123
125
124
# Assert that we have a Subject Alternative Name in the certificate.
126
- # (grep will exit with 1 here if there isn't a SAN in the certificate.)
127
- openssl x509 -in /conf/server.tls.crt -noout -text | grep DNS:
125
+ # (the test will exit with 1 here if there isn't a SAN in the certificate.)
126
+ [[ $( openssl x509 -in /conf/server.tls.crt -noout -text) == * DNS:* ]]
128
127
129
128
export SYNAPSE_TLS_CERT=/conf/server.tls.crt
130
129
export SYNAPSE_TLS_KEY=/conf/server.tls.key
You can’t perform that action at this time.
0 commit comments