Skip to content

Commit

Permalink
Tweaks for minimal bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
swelljoe committed Aug 9, 2017
1 parent 8123654 commit aa94335
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
10 changes: 5 additions & 5 deletions lib/Virtualmin/Config/MiniLAMP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ sub plugins {
# Modern system with systemd?
if (-x "/usr/bin/systemctl" || -x "/bin/systemctl") {
return [
"Webmin", "Apache", "Bind", "Net",
"Postfix", "MySQL", "Firewalld", "Procmail",
"ProFTPd", "Quotas", "Shells", "Status",
"Upgrade", "Usermin", "Webalizer", "MiniVirtualmin",
"NTP", "Fail2banFirewalld"
"Webmin", "Apache", "Bind", "Net",
"Postfix", "MySQL", "Firewalld", "Procmail",
"ProFTPd", "Quotas", "Shells", "Status",
"Upgrade", "Usermin", "MiniVirtualmin", "NTP",
"Fail2banFirewalld"
];
}
else {
Expand Down
10 changes: 5 additions & 5 deletions lib/Virtualmin/Config/MiniLEMP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ sub plugins {
# Modern system with systemd?
if (-x "/usr/bin/systemctl" || -x "/bin/systemctl") {
return [
"Webmin", "Nginx", "Bind", "Net",
"Postfix", "MySQL", "Firewalld", "Procmail",
"ProFTPd", "Quotas", "Shells", "Status",
"Upgrade", "Usermin", "Webalizer", "MiniVirtualmin",
"NTP", "Fail2banFirewalld"
"Webmin", "Nginx", "Bind", "Net",
"Postfix", "MySQL", "Firewalld", "Procmail",
"ProFTPd", "Quotas", "Shells", "Status",
"Upgrade", "Usermin", "MiniVirtualmin", "NTP",
"Fail2banFirewalld"
];
}
else {
Expand Down
3 changes: 2 additions & 1 deletion lib/Virtualmin/Config/Plugin/MiniVirtualmin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ sub new {

# inherit from Plugin
my $self
= $class->SUPER::new(name => 'MiniVirtualmin', depends => ['Usermin'], %args);
= $class->SUPER::new(name => 'MiniVirtualmin', depends => ['Usermin'],
%args);

return $self;
}
Expand Down
9 changes: 6 additions & 3 deletions t/01-plugins.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,23 @@ my $bundle = Virtualmin::Config->new(bundle => 'Dummy');
my @plugins = $bundle->_gather_plugins();
ok(
map {
grep {/Test/} @{$_}
grep {/Test/}
@{$_}
} @plugins
);
ok(
map {
grep {/Test2/} @{$_}
grep {/Test2/}
@{$_}
} @plugins
);

my $include = Virtualmin::Config->new(include => ['Test']);
my @plugins2 = $include->_gather_plugins();
ok(
map {
grep {/^Test$/} @{$_}
grep {/^Test$/}
@{$_}
} @plugins2
);
ok(scalar @plugins2 == 1);
Expand Down

0 comments on commit aa94335

Please sign in to comment.