Update constants.py

On FreeBSD or MacOS, "certbot --nginx" fails. The reason is, at these op. systems, nginx directory is different than linux.
This commit is contained in:
mabayhan 2018-04-12 16:33:10 -07:00 committed by GitHub
parent 2d31598484
commit c443db0618
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,14 @@
"""nginx plugin constants."""
import pkg_resources
import platform
if(platform.system() == ('FreeBSD' or 'Darwin')):
server_root_tmp = "/usr/local/etc/nginx"
else:
server_root_tmp = "/etc/nginx"
CLI_DEFAULTS = dict(
server_root="/etc/nginx",
server_root=server_root_tmp
ctl="nginx",
)
"""CLI defaults."""