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

fuse_unmount

=head1 DESCRIPTION

Script to unmount a fuse partition primarily used in conjuction with the
mount_sshfs command for the backup2 location

=cut

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

my ($mount_path) = get_argv(sub { -d $_[0] });
system_succeed("/bin/mountpoint", "-q", $mount_path);
system_succeed("/home/product/code/firmware/current/bin/fusermount", '-u',
               $mount_path);

