# Load POSIX
use POSIX qw(EXIT_SUCCESS EXIT_FAILURE);
-#XXX: debug
-use Data::Dumper;
+# Init prod
+my $prod = 0;
+
+# Strip and enable prod
+@ARGV = map { if ($_ eq '-p') { $prod = 1; (); } else { $_; } } @ARGV;
# Show usage
if (scalar(@ARGV) < 2) {
my $acme = acme->new(shift @ARGV, @ARGV);
# Prepare environement
-$acme->prepare();
+$acme->prepare($prod);
# Generate required keys
$acme->genKeys();
$acme->genCsr();
# Directory
-$acme->directory();
+$acme->directory($prod);
# Register
$acme->register();
# Authorize
-$acme->authorize();
+$acme->authorize($prod);
# Issue
$acme->issue();