Commit 40f4549a authored by Nigel Kukard's avatar Nigel Kukard

Resolved some issues with perl critic

parent 71593775
......@@ -114,7 +114,7 @@ sub accountInit
# Make sure the dir exists...
my $dir = "/etc/awit-certmaster";
if (! -d $dir) {
my @created = make_path($dir,{ 'mode' => 0700 });
my @created = make_path($dir,{ 'mode' => oct(700) });
}
# Check if the dir was created
if (! -d $dir) {
......@@ -245,7 +245,9 @@ sub webserverCheckApache
$self->logger("INFO","APACHE: Processing vhost '%s'",$vhostName);
# Open config file
## no critic (RequireBriefOpen)
if (open(my $FH,'<',$vhost->{'config'})) {
## use critic
# Read in each line
my @serverNames = ();
while (my $line = <$FH>) {
......@@ -341,7 +343,9 @@ sub webserverCheckNginx
$self->logger("INFO","NGINX: Processing vhost '%s'",$vhostName);
# Open config file
## no critic (RequireBriefOpen)
if (open(my $FH,'<',$vhost->{'config'})) {
## use critic
# Read in each line
my @serverNames = ();
while (my $line = <$FH>) {
......@@ -869,7 +873,9 @@ sub _parse_x509_datetime
## no critic (ProhibitMultiplePackages)
package AWIT::CertMaster::LetsEncrypt;
## use critic
use strict;
......@@ -915,7 +921,7 @@ END {
# CONSTANTS
sub NID_SUBJECT_ALT_NAME { 85; }
sub NID_SUBJECT_ALT_NAME { return 85; }
......@@ -1483,9 +1489,9 @@ sub leHandleChallenge
$self->logger("INFO","LE: - Please add DNS entry: _acme-challenge.%s IN TXT '%s'",$domain,$dnsKey);
print STDERR "Press <ENTER> when its added...";
# print STDERR "Press <ENTER> when its added...";
my $something = <STDIN>;
# my $something = <STDIN>;
#
......@@ -1525,7 +1531,7 @@ sub leHandleChallenge
# Make sure the dir exists...
umask(0022);
if (! -d $dir) {
my @created = make_path($dir,{ 'mode' => 0755 });
my @created = make_path($dir,{ 'mode' => oct(755) });
}
# Check if the dir was created
if (! -d $dir) {
......@@ -1734,7 +1740,10 @@ sub _leDirectoryLinks
## no critic (ProhibitMultiplePackages)
package main;
## use critic
use strict;
use warnings;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment