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

enable_logo_writing

=head1 DESCRIPTION

Wraps chmod calls enabling writing to the logo

=cut

my @args = get_argv(qr/\w/);
my $ext = shift @args;
system('/bin/touch', "$Barracuda::Environment::path_firmware/web/images/custom_logo.$ext");
system("/bin/chmod", "0666", "$Barracuda::Environment::path_firmware/web/images/custom_logo.$ext");
exit $? >>8;

