restart nginx in reload command

This commit is contained in:
VirtuBox 2018-11-07 10:28:43 +01:00 committed by GitHub
parent 192307ac55
commit cd8b927af9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -68,6 +68,11 @@ _help() {
return 0
}
if [ "$#" = "0" ]; then
_help
exit 1
fi
if [ ! -f /etc/systemd/system/multi-user.target.wants/nginx.service ]; then
{
sudo systemctl enable nginx.service
@ -218,7 +223,7 @@ if [ -f $HOME/.acme.sh/${domain_name}_ecc/fullchain.cer ]; then
--cert-file /etc/letsencrypt/live/${domain_name}/cert.pem \
--key-file /etc/letsencrypt/live/${domain_name}/key.pem \
--fullchain-file /etc/letsencrypt/live/${domain_name}/fullchain.pem \
--reloadcmd "sudo systemctl enable nginx.service && sudo systemctl start nginx.service"
--reloadcmd "sudo systemctl enable nginx.service && sudo systemctl restart nginx.service"
else
echo "####################################"
echo "Acme.sh failed to issue certificate"