mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 23:23:32 +01:00
Creating of *.pem of symlinks is not atomic #564
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ibukanov on GitHub (Dec 26, 2021).
Currently if one of ln -sf at the end of sign_domain fails, it will leave the file in inconsistent state when some of certificate links points to newer files while other to older files. If the webserver is restarted at that moment, it may ends up with wrong non-working ssl config.
A possible workaround is to create a directory like
links.$timestamp, place symlinks there. Then have a symlink likelinkspointing tolinks.$timestamp. Then makeprivkey.pemetc. to point tolinks/privkey.pemwhich in turn will point toprevkey.timestamp.pem. This way only single linklinkswill need to be updated to pint to the newlinks.$timestampand that is atomic.A variation of that is to place all generated files into
cert.$timestampdirectory and have a symlink likecurrentthat points to this directory. This is simpler, but is not compatible with current setups.