Skip to content

Commit

Permalink
assuming a readonly root, if we gen certs, don't overwrite the originals
Browse files Browse the repository at this point in the history
Signed-off-by: Caolán McNamara <[email protected]>
Change-Id: Id1077ff63203f74f4802af087558a6ae652fbcf1
  • Loading branch information
caolanm committed Mar 7, 2025
1 parent d26d3bf commit d294c6a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions docker/from-packages/scripts/start-collabora-online.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ else
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}"
fi
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
mv -f certs/servers/localhost/privkey.pem /etc/coolwsd/key.pem
mv -f certs/servers/localhost/cert.pem /etc/coolwsd/cert.pem
mv -f certs/ca/root.crt.pem /etc/coolwsd/ca-chain.cert.pem
cert_params="\
--o:ssl.cert_file_path=/tmp/ssl/certs/servers/localhost/cert.pem \
--o:ssl.key_file_path=/tmp/ssl/certs/servers/localhost/privkey.pem \
--o:ssl.ca_file_path=/tmp/ssl/certs/ca/root.crt.pem"
fi

# Start coolwsd
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} "$@"
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} "$@"
9 changes: 5 additions & 4 deletions docker/from-source-gh-action/start-collabora-online.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ else
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}"
fi
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
mv -f certs/servers/localhost/privkey.pem /etc/coolwsd/key.pem
mv -f certs/servers/localhost/cert.pem /etc/coolwsd/cert.pem
mv -f certs/ca/root.crt.pem /etc/coolwsd/ca-chain.cert.pem
cert_params="\
--o:ssl.cert_file_path=/tmp/ssl/certs/servers/localhost/cert.pem \
--o:ssl.key_file_path=/tmp/ssl/certs/servers/localhost/privkey.pem \
--o:ssl.ca_file_path=/tmp/ssl/certs/ca/root.crt.pem"
fi

# Start coolwsd
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} "$@"
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 comments on commit d294c6a

Please sign in to comment.