Automatically import existing local CA cerificates
This commit is contained in:
parent
e6f22c53e5
commit
ba68bd9941
2 changed files with 13 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,4 +5,5 @@ tools/__pycache__/
|
||||||
externals/
|
externals/
|
||||||
.env
|
.env
|
||||||
.vagrant
|
.vagrant
|
||||||
api/docs/api-docs.html
|
api/docs/api-docs.html
|
||||||
|
mailinabox-ca.crt
|
||||||
|
|
|
@ -126,3 +126,14 @@ EOF
|
||||||
|
|
||||||
# Start the management server.
|
# Start the management server.
|
||||||
restart_service mailinabox
|
restart_service mailinabox
|
||||||
|
|
||||||
|
# FOR DEVELOPMENT PURPOSES ONLY:
|
||||||
|
# If there is a CA certificate in the folder, install it.
|
||||||
|
# MIAB will only accept a manual certificate installation
|
||||||
|
# if it is signed by a CA trusted by it.
|
||||||
|
if [[ -f mailinabox-ca.crt ]]; then
|
||||||
|
echo "Custom CA certificate detected. Installing..."
|
||||||
|
rm -f /usr/local/share/ca-certificates/mailinabox-ca.crt
|
||||||
|
cp mailinabox-ca.crt /usr/local/share/ca-certificates/
|
||||||
|
update-ca-certificates --fresh
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue