Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eol to letsencrypt provided files [Issue #110] #111

Merged
merged 1 commit into from
Mar 31, 2016
Merged

Add eol to letsencrypt provided files [Issue #110] #111

merged 1 commit into from
Mar 31, 2016

Conversation

willtho89
Copy link
Contributor

Some LE tools like simp_le create the cert files with no end-of-line. This change adds an eol if non exists.

If a file does not exist, sed throws an error on STDERR. It might be a good idea to check for file existence first like in the "self-signed" and "custom" case.

This fixes Issue #110 .

@tomav
Copy link
Contributor

tomav commented Mar 31, 2016

Thank you @reldeiS

@tomav tomav merged commit 735bbca into docker-mailserver:master Mar 31, 2016
@00angus
Copy link
Contributor

00angus commented Apr 4, 2016

I've just discovered that this patch unlink the files in the 'live' directory of LE config dir, in particular:

  • under the 'live' path there are symlinks to the archive directory, for continuity between updates
  • the patch sed -i -e '$a\' /etc/letsencrypt/live/$(hostname)/cert.pem cause the unlink in the 'live' directory and the creation of a new file not linked to the one in the archive directory

@reldeiS : does this may breaks future updates of letsencrypt certificates ?

@willtho89
Copy link
Contributor Author

I can't recreate this on my machine in a quick test. The files created with the standard LE binary already have the eol, so the files are not changed.
I'll look into it.

@tomav I will change it the way Dominik suggested in #110. That way the LE created files are never touched and no unlinking should happen

@00angus
Copy link
Contributor

00angus commented Apr 5, 2016

Thanks for the fast update. Anyway for future reference the problem arise even in case EOLs are presents in the files, the problem being simply the use of the switch '-i' to sed itself.

@willtho89
Copy link
Contributor Author

yes i see where the problem was. On my host (Ubuntu 14.04) the links stay in tact.
However i fixed it in #118 by simply not changing the LE created *.pem files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with combined.pem from LE certificates
3 participants