Skip to content

Instantly share code, notes, and snippets.

@reneeb
Created June 2, 2021 09:28
Show Gist options
  • Save reneeb/3aca0b607baf1b2ce2d2524ad4a9f139 to your computer and use it in GitHub Desktop.
Save reneeb/3aca0b607baf1b2ce2d2524ad4a9f139 to your computer and use it in GitHub Desktop.
Check if all navigation bar modules can be loaded
#!/usr/bin/perl
use strict;
use warnings;
use lib qw(/opt/otrs);
use Kernel::System::ObjectManager;
local $Kernel::OM = Kernel::System::ObjectManager->new;
my $MainObject = $Kernel::OM->Get('Kernel::System::Main');
my $ConfigObject = $Kernel::OM->Get('Kernel::Config');
my @Configs = (
'Frontend::NavBarOutputModule',
'Frontend::NotifyModule',
'Frontend::NavBarModule',
"Frontend::NavigationModule",
);
for my $ConfigKey ( @Configs ) {
my $Config = $ConfigObject->Get($ConfigKey);
for my $Module ( keys %{ $Config || {} } ) {
next if $MainObject->Require(
$Config->{$Module}->{Module},
Silent => 1,
);
print "Please check sysconfig option $Module ($ConfigKey)!\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment