#!/home/product/code/webui-perl/bin/perl -T -I /home/product/code/firmware/current/lib/perl5
#SUDOER_USERS: nobody
#SUDOER_RUNAS_USERS: root, mta
#SUDOER_TAGS: NOPASSWD, EXEC
use strict;
use warnings;
use Barracuda::Sudo::Lib;
use Barracuda::Environment;

###############################################################################

=pod

=head1 NAME

generate_private_cert

=head1 DESCRIPTION

Call /home/product/code/firmware/current/bin/generate_private_cert with no arguments.

=cut

###############################################################################
use IPC::Run qw(run);

my $outfile = sudo_out();
my $cmd = "${Barracuda::Environment::path_firmware}/bin/generate_private_cert";

my $undef = undef;

run([$cmd], \$undef, $outfile, \$undef);

#Note: run's result is not the result of the command. !run will return 1 upon the command error and 2 upon its own error.
exit $? >>8;


