diff --git a/CHANGELOG.md b/CHANGELOG.md index be1a8dba1..97ba2225b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,13 +14,14 @@ Certbot adheres to [Semantic Versioning](http://semver.org/). ### Fixed -* +* The default work and log directories have been changed back to + /var/lib/letsencrypt and /var/log/letsencrypt respectively. Despite us having broken lockstep, we are continuing to release new versions of all Certbot components during releases for the time being, however, the only package with changes other than its version number was: -* +* certbot More details about these changes can be found on our GitHub repo. diff --git a/certbot/compat.py b/certbot/compat.py index 7e509206f..7d936aa9d 100644 --- a/certbot/compat.py +++ b/certbot/compat.py @@ -180,8 +180,8 @@ WINDOWS_DEFAULT_FOLDERS = { } LINUX_DEFAULT_FOLDERS = { 'config': '/etc/letsencrypt', - 'work': '/var/letsencrypt/lib', - 'logs': '/var/letsencrypt/log', + 'work': '/var/lib/letsencrypt', + 'logs': '/var/log/letsencrypt', } def get_default_folder(folder_type): diff --git a/certbot/tests/cli_test.py b/certbot/tests/cli_test.py index 1448b86e7..e16a1bdcf 100644 --- a/certbot/tests/cli_test.py +++ b/certbot/tests/cli_test.py @@ -4,6 +4,7 @@ import unittest import os import tempfile import copy +import sys import mock import six @@ -41,6 +42,15 @@ class TestReadFile(TempDirTestCase): self.assertEqual(contents, test_contents) +class FlagDefaultTest(unittest.TestCase): + """Tests cli.flag_default""" + + def test_linux_directories(self): + if 'fcntl' in sys.modules: + self.assertEqual(cli.flag_default('config_dir'), '/etc/letsencrypt') + self.assertEqual(cli.flag_default('work_dir'), '/var/lib/letsencrypt') + self.assertEqual(cli.flag_default('logs_dir'), '/var/log/letsencrypt') + class ParseTest(unittest.TestCase): # pylint: disable=too-many-public-methods '''Test the cli args entrypoint'''