aboutsummaryrefslogtreecommitdiff
path: root/lib/App/Acmeman/Source/Default.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App/Acmeman/Source/Default.pm')
-rw-r--r--lib/App/Acmeman/Source/Default.pm48
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/App/Acmeman/Source/Default.pm b/lib/App/Acmeman/Source/Default.pm
new file mode 100644
index 0000000..9f9bd86
--- /dev/null
+++ b/lib/App/Acmeman/Source/Default.pm
@@ -0,0 +1,48 @@
+package App::Acmeman::Source::Default;
+use strict;
+use warnings;
+use parent 'App::Acmeman::Source';
+
+sub new {
+ my $self;
+ shift; # Skip class name.
+ eval {
+ require App::Acmeman::Source::Apache;
+ $self = new App::Acmeman::Source::Apache(@_);
+ };
+ if ($@) {
+ (my $s = $@) =~ s{ at /.+$}{};
+ chomp($s);
+ die <<EOT;
+No valid domain source configured.
+
+You are seeing this error because acmeman was unable to load the default
+domain source module.
+
+The default domain source "apache" scans Apache configuration files and
+extracts names listed in ServerName and ServerAlias directives which have
+LetsEncrypt certificates configured.
+
+The source module couldn't be loaded because of the following error:
+
+"$s"
+
+If you are going to use the "apache" source, fix this error and retry.
+Otherwise, please create the /etc/acmeman.conf configuration file, and
+configure another domain source, for example:
+
+ [core]
+ source = file DOMAINFILE
+
+Please, see acmeman(1) (or run "acmeman --help") for a detailed discussion
+of available domain sources.
+
+EOT
+;
+ }
+ return $self;
+}
+
+1;
+
+

Return to:

Send suggestions and report system problems to the System administrator.