diff --git a/CHANGELOG.md b/CHANGELOG.md index ac7f34a09..e7abdfcee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). ### Added +* Add FreeBSD specific paths to certbot * ### Changed diff --git a/certbot/compat/misc.py b/certbot/compat/misc.py index 4f0e22078..b22fa93e8 100644 --- a/certbot/compat/misc.py +++ b/certbot/compat/misc.py @@ -129,7 +129,11 @@ LINUX_DEFAULT_FOLDERS = { 'work': '/var/lib/letsencrypt', 'logs': '/var/log/letsencrypt', } - +FREEBSD_DEFAULT_FOLDERS = { + 'config': '/usr/local/etc/letsencrypt', + 'work': '/var/db/letsencrypt', + 'logs': '/var/log/letsencrypt', +} def get_default_folder(folder_type): """ @@ -142,6 +146,10 @@ def get_default_folder(folder_type): """ if os.name != 'nt': + # Unix-like + if sys.platform.startswith('freebsd') or sys.platform.startswith('dragonfly'): + # FreeBSD specific + return FREEBSD_DEFAULT_FOLDERS[folder_type] # Linux specific return LINUX_DEFAULT_FOLDERS[folder_type] # Windows specific