Skip to content

Split long lines in domains.txt (revised)#662

Open
redneck-f25 wants to merge 4 commits into
dehydrated-io:masterfrom
redneck-f25:feature-split_domain_lines
Open

Split long lines in domains.txt (revised)#662
redneck-f25 wants to merge 4 commits into
dehydrated-io:masterfrom
redneck-f25:feature-split_domain_lines

Conversation

@redneck-f25

@redneck-f25 redneck-f25 commented Aug 16, 2019

Copy link
Copy Markdown

According to your comment (#642 (comment)) 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

Copy link
Copy Markdown
Author

@mrhackcz

Copy link
Copy Markdown

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' |

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.

2 participants