Letsencrypt certificates should include alias and subservers

Hi guys,

After some research I have found a way to achieve both www.domain.com and domain.com included in letsencrypt requested certificate.
I changed following line in /usr/libexec/webmin/webmin/letsencrypt-lib.pl:

my $out = &backquote_command("cd $dir && (echo A | $letsencrypt_cmd certonly -a webroot “.join(” ", map { “-d “.quotemeta($_) } @doms).” --webroot-path “.quotemeta(webroot).” --duplicate --config $temp 2>&1)”);

to:

my $out = &backquote_command("cd $dir && (echo A | $letsencrypt_cmd certonly -a webroot -d www.$dom ".join(" ", map { "-d ".quotemeta($_) } @doms)." --webroot-path ".quotemeta(webroot)." --duplicate --config $temp 2>&1)");

It worked like a charm for me. If there is more elegant way to achieve this, please share.

Regards,
Dean Iliev