Skip to content

Commit

Permalink
ServiceFactory: recognise 'https' service
Browse files Browse the repository at this point in the history
  • Loading branch information
elliefm committed Nov 13, 2024
1 parent 9f58024 commit acf1505
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions cassandane/Cassandane/ServiceFactory.pm
Original file line number Diff line number Diff line change
Expand Up @@ -60,29 +60,23 @@ sub create
}

# try and guess some service-specific defaults
if ($name =~ m/imaps/)
if ($name =~ m/imap(s?)/)
{
return Cassandane::IMAPService->new(
argv => ['imapd', '-s'],
%params);
}
elsif ($name =~ m/imap/)
{
return Cassandane::IMAPService->new(
argv => ['imapd'],
%params);
my @argv = 'imapd';
push @argv, '-s' if $1;
return Cassandane::IMAPService->new(argv => \@argv, %params);
}
elsif ($name =~ m/sync/)
{
return Cassandane::Service->new(
argv => ['imapd'],
%params);
}
elsif ($name =~ m/http/)
elsif ($name =~ m/http(s?)/)
{
return Cassandane::Service->new(
argv => ['httpd'],
%params);
my @argv = 'httpd';
push @argv, '-s' if $1;
return Cassandane::Service->new(argv => \@argv, %params);
}
elsif ($name =~ m/lmtp/)
{
Expand Down

0 comments on commit acf1505

Please sign in to comment.