Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
fe1136aa
Unverified
Commit
fe1136aa
authored
Dec 02, 2020
by
neil
Committed by
GitHub
Dec 02, 2020
Browse files
Merge pull request #3280 from christianbur/patch-7
Update mailcow.sh
parents
8950ffcc
2bc62797
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/mailcow.sh
View file @
fe1136aa
...
...
@@ -27,26 +27,46 @@ mailcow_deploy() {
return
1
fi
_ssl_path
=
"
${
_mailcow_path
}
/data/assets/ssl/"
#Tests if _ssl_path is the mailcow root directory.
if
[
-f
"
${
_mailcow_path
}
/generate_config.sh"
]
;
then
_ssl_path
=
"
${
_mailcow_path
}
/data/assets/ssl/"
else
_ssl_path
=
"
${
_mailcow_path
}
"
fi
if
[
!
-d
"
$_ssl_path
"
]
;
then
_err
"Cannot find mailcow ssl path:
$_ssl_path
"
return
1
fi
# ECC or RSA
if
[
-z
"
${
Le_Keylength
}
"
]
;
then
Le_Keylength
=
""
fi
if
_isEccKey
"
${
Le_Keylength
}
"
;
then
_info
"ECC key type detected"
_cert_type
=
"ecdsa"
_cert_name_prefix
=
"ecdsa-"
else
_info
"RSA key type detected"
_cert_type
=
"rsa"
_cert_name_prefix
=
""
fi
_info
"Copying key and cert"
_real_key
=
"
$_ssl_path
/key.pem"
_real_key
=
"
$_ssl_path
/
${
_cert_name_prefix
}
key.pem"
if
!
cat
"
$_ckey
"
>
"
$_real_key
"
;
then
_err
"Error: write key file to:
$_real_key
"
return
1
fi
_real_fullchain
=
"
$_ssl_path
/cert.pem"
_real_fullchain
=
"
$_ssl_path
/
${
_cert_name_prefix
}
cert.pem"
if
!
cat
"
$_cfullchain
"
>
"
$_real_fullchain
"
;
then
_err
"Error: write cert file to:
$_real_fullchain
"
return
1
fi
DEFAULT_MAILCOW_RELOAD
=
"
cd
${
_mailcow_path
}
&& docker-compose restart postfi
x-mailcow do
vecot-mailcow nginx
-mailcow"
DEFAULT_MAILCOW_RELOAD
=
"
docker restart
$(
docker ps
-qaf
name
=
postfix-mailcow
)
; docker restart
$(
docker ps
-qaf
name
=
ngin
x-mailcow
)
;
do
cker restart
$(
docker ps
-qaf
name
=
dovecot
-mailcow
)
"
_reload
=
"
${
DEPLOY_MAILCOW_RELOAD
:-
$DEFAULT_MAILCOW_RELOAD
}
"
_info
"Run reload:
$_reload
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment