Lines 2-13
Link Here
|
2 |
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233909 |
2 |
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233909 |
3 |
# TODO: Upstream |
3 |
# TODO: Upstream |
4 |
|
4 |
|
5 |
--- certbot/compat.py.orig 2019-01-24 22:07:15 UTC |
5 |
--- certbot/compat.py.orig 2019-02-07 21:20:29 UTC |
6 |
+++ certbot/compat.py |
6 |
+++ certbot/compat.py |
7 |
@@ -184,6 +184,12 @@ LINUX_DEFAULT_FOLDERS = { |
7 |
@@ -189,6 +189,12 @@ LINUX_DEFAULT_FOLDERS = { |
8 |
'logs': '/var/log/letsencrypt', |
|
|
9 |
} |
8 |
} |
10 |
|
9 |
|
|
|
10 |
|
11 |
+FREEBSD_DEFAULT_FOLDERS = { |
11 |
+FREEBSD_DEFAULT_FOLDERS = { |
12 |
+ 'config': '/usr/local/etc/letsencrypt', |
12 |
+ 'config': '/usr/local/etc/letsencrypt', |
13 |
+ 'work': '/var/db/letsencrypt', |
13 |
+ 'work': '/var/db/letsencrypt', |
Lines 17-37
Link Here
|
17 |
def get_default_folder(folder_type): |
17 |
def get_default_folder(folder_type): |
18 |
""" |
18 |
""" |
19 |
Return the relevant default folder for the current OS |
19 |
Return the relevant default folder for the current OS |
20 |
@@ -195,7 +201,13 @@ def get_default_folder(folder_type): |
20 |
@@ -199,6 +205,9 @@ def get_default_folder(folder_type): |
|
|
21 |
:rtype: str |
21 |
|
22 |
|
22 |
""" |
23 |
""" |
23 |
if 'fcntl' in sys.modules: |
24 |
+ if sys.platform.startswith('freebsd') or sys.platform.startswith('dragonfly'): |
24 |
- # Linux specific |
25 |
+ # FreeBSD specific |
25 |
- return LINUX_DEFAULT_FOLDERS[folder_type] |
26 |
+ return FREEBSD_DEFAULT_FOLDERS[folder_type] |
26 |
- # Windows specific |
27 |
if os.name != 'nt': |
27 |
- return WINDOWS_DEFAULT_FOLDERS[folder_type] |
28 |
# Linux specific |
28 |
+ # Unix-like |
29 |
return LINUX_DEFAULT_FOLDERS[folder_type] |
29 |
+ if sys.platform.startswith('freebsd') or sys.platform.startswith('dragonfly'): |
|
|
30 |
+ # FreeBSD specific |
31 |
+ return FREEBSD_DEFAULT_FOLDERS[folder_type] |
32 |
+ else: |
33 |
+ # Linux specific |
34 |
+ return LINUX_DEFAULT_FOLDERS[folder_type] |
35 |
+ else: |
36 |
+ # Windows specific |
37 |
+ return WINDOWS_DEFAULT_FOLDERS[folder_type] |