Skip to content

Commit 584c8d7

Browse files
Remove unnecessary code after adding uniq in domain parsing
In the previous commit we made sure that we only returned a list of unique server_names/domains, which is basically what this code did previously. I also found out that certbot is able to ignore duplicate domain names in the request made to it, so this code was superfluous to begin with :(
1 parent 38770c7 commit 584c8d7

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/scripts/run_certbot.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,7 @@ for conf_file in /etc/nginx/conf.d/*.conf*; do
2222

2323
# Find all 'server_names' in this .conf file
2424
for server_name in $(parse_server_names $conf_file); do
25-
if [ -n "$server_name" ]; then
26-
# String is not empty
27-
tmp="-d $server_name"
28-
if [[ ! $domain_request =~ $tmp ]]; then
29-
# This server name was not found in the domain request,
30-
# append it...
31-
domain_request="$domain_request -d $server_name"
32-
fi
33-
fi
25+
domain_request="$domain_request -d $server_name"
3426
done
3527

3628
if ! get_certificate $primary_domain $CERTBOT_EMAIL "$domain_request"; then

0 commit comments

Comments
 (0)