Skip to content

Commit d294c6a

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 d26d3bf commit d294c6a

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
@@ -20,10 +20,11 @@ else
2020
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}"
2121
fi
2222
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
23-
mv -f certs/servers/localhost/privkey.pem /etc/coolwsd/key.pem
24-
mv -f certs/servers/localhost/cert.pem /etc/coolwsd/cert.pem
25-
mv -f certs/ca/root.crt.pem /etc/coolwsd/ca-chain.cert.pem
23+
cert_params="\
24+
--o:ssl.cert_file_path=/tmp/ssl/certs/servers/localhost/cert.pem \
25+
--o:ssl.key_file_path=/tmp/ssl/certs/servers/localhost/privkey.pem \
26+
--o:ssl.ca_file_path=/tmp/ssl/certs/ca/root.crt.pem"
2627
fi
2728

2829
# Start coolwsd
29-
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} "$@"
30+
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
@@ -20,10 +20,11 @@ else
2020
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}"
2121
fi
2222
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
23-
mv -f certs/servers/localhost/privkey.pem /etc/coolwsd/key.pem
24-
mv -f certs/servers/localhost/cert.pem /etc/coolwsd/cert.pem
25-
mv -f certs/ca/root.crt.pem /etc/coolwsd/ca-chain.cert.pem
23+
cert_params="\
24+
--o:ssl.cert_file_path=/tmp/ssl/certs/servers/localhost/cert.pem \
25+
--o:ssl.key_file_path=/tmp/ssl/certs/servers/localhost/privkey.pem \
26+
--o:ssl.ca_file_path=/tmp/ssl/certs/ca/root.crt.pem"
2627
fi
2728

2829
# Start coolwsd
29-
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} "$@"
30+
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)