#!/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;

=pod

=head1 NAME

init_d: provides reflections of /etc/init.d/ scripts on a whitelisted
basis.

=cut

my @args = get_argv(
    is_whitelisted(qw(iptables clamd bdns)),
    is_whitelisted("start", "stop", "restart")
    );

system_succeed("/etc/init.d/" . $args[0], $args[1]);
