mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 06:15:36 -04:00
Show both possible Nginx default server root values in docs
This commit is contained in:
parent
1e1e7d8e97
commit
17c40c6547
2 changed files with 10 additions and 3 deletions
|
|
@ -69,7 +69,11 @@ class NginxConfigurator(common.Installer):
|
|||
|
||||
@classmethod
|
||||
def add_parser_arguments(cls, add):
|
||||
add("server-root", default=constants.CLI_DEFAULTS["server_root"],
|
||||
if os.environ.get("CERTBOT_DOCS") == "1":
|
||||
default_server_root = "%s or %s" % (LINUX_SERVER_ROOT, FREEBSD_DARWIN_SERVER_ROOT)
|
||||
else:
|
||||
default_server_root = constants.CLI_DEFAULTS["server_root"]
|
||||
add("server-root", default=default_server_root,
|
||||
help="Nginx server root directory.")
|
||||
add("ctl", default=constants.CLI_DEFAULTS["ctl"], help="Path to the "
|
||||
"'nginx' binary, used for 'configtest' and retrieving nginx "
|
||||
|
|
|
|||
|
|
@ -2,10 +2,13 @@
|
|||
import pkg_resources
|
||||
import platform
|
||||
|
||||
FREEBSD_DARWIN_SERVER_ROOT = "/usr/local/etc/nginx"
|
||||
LINUX_SERVER_ROOT = "/etc/nginx"
|
||||
|
||||
if platform.system() in ('FreeBSD', 'Darwin'):
|
||||
server_root_tmp = "/usr/local/etc/nginx"
|
||||
server_root_tmp = FREEBSD_DARWIN_SERVER_ROOT
|
||||
else:
|
||||
server_root_tmp = "/etc/nginx"
|
||||
server_root_tmp = LINUX_SERVER_ROOT
|
||||
|
||||
CLI_DEFAULTS = dict(
|
||||
server_root=server_root_tmp,
|
||||
|
|
|
|||
Loading…
Reference in a new issue