dehydrated icon indicating copy to clipboard operation
dehydrated copied to clipboard

Split long lines in domains.txt (revised)

Open redneck-f25 opened this issue 6 years ago • 2 comments

According to your comment (https://github.com/lukas2511/dehydrated/pull/642#issuecomment-521625332) I revised my modifications.

There is a script to test the parsing of domains.txt at https://gist.github.com/redneck-f25/51ba79d0d3ef8a43a2eacffb672fd9d2.

Since many NAS- and Administration-Systems (e.g. Synology Diskstation and Plesk) have a plugin for LE for "simple" configurations it is the task of Dehydrated (which is great, btw) to handle more comlicated situations.

Thanks for your great work.

# example domains.txt
draft.example.com alias.example.com
draft1.example.com\
alias1.draft1.example.com\
# disabled: alias2.draft1.example.com\
alias3.draft1.example.com\

draft2.example.com \
  alias1.draft2.example.com \
  alias2.draft2.example.com \
  # disabled: alias3.draft2.example.com
draft3.example.com                  \
  alias1.draft3.example.com      \
  alias2.draft3.example.com      \
  # disabled: alias3.draft3.example.com
# end of domains.txt

redneck-f25 avatar Aug 16 '19 10:08 redneck-f25

Hi. Very usefull feature. Can you please add this to next release ? @lukas2511

I think it can be much easier with just changing line 1675 from:

_sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' -e 's/[[:space:]]+/ /g' -e 's/([^ ])>/\1 >/g' -e 's/> />/g' |

to

_sed -e 's/^[[:space:]]*//g' -e 's/[[:space:]]*$//g' -e 's/[[:space:]]+/ /g' -e 's/([^ ])>/\1 >/g' -e ':a;N;$!ba;s/\\\n/ /g' -e 's/> />/g' |

mrhackcz avatar Nov 22 '22 17:11 mrhackcz