Skip to content

Commit 0db2853

Browse files
committed
assuming a readonly root, if we gen certs, don't overwrite the originals
Signed-off-by: Caolán McNamara <[email protected]> Change-Id: Id1077ff63203f74f4802af087558a6ae652fbcf1
1 parent 6ea1ad0 commit 0db2853

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

docker/from-packages/scripts/start-collabora-online.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ else
2121
openssl req -key certs/servers/localhost/privkey.pem -new -sha256 -out certs/tmp/localhost.csr.pem -subj "/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=${cert_domain}"
2222
fi
2323
openssl x509 -req -in certs/tmp/localhost.csr.pem -CA certs/ca/root.crt.pem -CAkey certs/ca/root.key.pem -CAcreateserial -out certs/servers/localhost/cert.pem -days 9131
24-
mv -f certs/servers/localhost/privkey.pem /etc/coolwsd/key.pem
25-
mv -f certs/servers/localhost/cert.pem /etc/coolwsd/cert.pem
26-
mv -f certs/ca/root.crt.pem /etc/coolwsd/ca-chain.cert.pem
24+
cert_params="\
25+
--o:ssl.cert_file_path=/tmp/ssl/certs/servers/localhost/cert.pem \
26+
--o:ssl.key_file_path=/tmp/ssl/certs/servers/localhost/privkey.pem \
27+
--o:ssl.ca_file_path=/tmp/ssl/certs/ca/root.crt.pem"
2728
fi
2829

2930
# Start coolwsd
30-
exec /usr/bin/coolwsd --version --use-env-vars --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd --o:cache_files.path=/opt/cool/cache --o:logging.color=false --o:stop_on_config_change=true ${extra_params} "$@"
31+
exec /usr/bin/coolwsd --version --use-env-vars ${cert_params} --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd --o:cache_files.path=/opt/cool/cache --o:logging.color=false --o:stop_on_config_change=true ${extra_params} "$@"

docker/from-source-gh-action/start-collabora-online.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ else
2121
openssl req -key certs/servers/localhost/privkey.pem -new -sha256 -out certs/tmp/localhost.csr.pem -subj "/C=DE/ST=BW/L=Stuttgart/O=Dummy Authority/CN=${cert_domain}"
2222
fi
2323
openssl x509 -req -in certs/tmp/localhost.csr.pem -CA certs/ca/root.crt.pem -CAkey certs/ca/root.key.pem -CAcreateserial -out certs/servers/localhost/cert.pem -days 9131
24-
mv -f certs/servers/localhost/privkey.pem /etc/coolwsd/key.pem
25-
mv -f certs/servers/localhost/cert.pem /etc/coolwsd/cert.pem
26-
mv -f certs/ca/root.crt.pem /etc/coolwsd/ca-chain.cert.pem
24+
cert_params="\
25+
--o:ssl.cert_file_path=/tmp/ssl/certs/servers/localhost/cert.pem \
26+
--o:ssl.key_file_path=/tmp/ssl/certs/servers/localhost/privkey.pem \
27+
--o:ssl.ca_file_path=/tmp/ssl/certs/ca/root.crt.pem"
2728
fi
2829

2930
# Start coolwsd
30-
exec /usr/bin/coolwsd --version --use-env-vars --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd --o:cache_files.path=/opt/cool/cache --o:logging.color=false --o:stop_on_config_change=true ${extra_params} "$@"
31+
exec /usr/bin/coolwsd --version --use-env-vars ${cert_params} --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd --o:cache_files.path=/opt/cool/cache --o:logging.color=false --o:stop_on_config_change=true ${extra_params} "$@"

0 commit comments

Comments
 (0)