#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel - scripts/clear_orphaned_virtfs_mounts Copyright 2022 cPanel, L.L.C.
# All rights reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
use strict;
use warnings;
use Cpanel::Config::LoadUserDomains ();
use Getopt::Param ();
use Cpanel::Filesys::Virtfs ();
use Cpanel::PwCache::Get ();
use Cpanel::CloudLinux::CageFS ();
my $prm = Getopt::Param->new(
{
'help_coderef' => sub {
print <<"END_USAGE";
Unmount any virtfs mounts whose users no longer exist or whose shell is not currently jailshell/noshell
$0 [--help] [--errorsonly] [--inactiveonly] [--clearall] [--user=