From b7408908e246ab888b84d2f8ae31c99f41cf5508 Mon Sep 17 00:00:00 2001 From: Piotr Pawlow Date: Thu, 14 Apr 2016 18:02:44 +0200 Subject: Add --config option --- renew.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renew.pl b/renew.pl index 2cdb8e8..0b25e0e 100755 --- a/renew.pl +++ b/renew.pl @@ -6,6 +6,7 @@ use warnings; use autodie qw(:all); use Date::Parse; use LWP::UserAgent; +use Getopt::Long; { our @restart_services_cmd = qw(sudo service httpd graceful); @@ -15,8 +16,10 @@ use LWP::UserAgent; our $challenges_dir = 'data/challenges/'; our $days_left_limit = 14; our $csr_dir = 'data'; + our $config_file; - require 'config.pm' if -e 'config.pm'; + GetOptions("config=s" => \$config_file); + require $config_file if defined $config_file; sub get_intermediate_cert_url { my $crt_fn = shift; -- cgit v1.2.3