sub do_diagnostic {
+ my $service = shift;
my $alive = do_init(1);
- my @services = get_service_list_from_files(1);
my @conf_services;
if ($alive) {
@conf_services = (@perl_services,
map {$_->{service}} @nonperl_services);
- push(@services, @conf_services);
+ }
+
+ my @services;
+ if ($service) {
+ @services = $service;
+ } else {
+ @services = get_service_list_from_files(1);
+ if ($alive) {
+ push(@services, @conf_services);
+ }
}
my %services;
$opt_router_re_register_all;
# misc
-do_diagnostic() if $opt_diagnostic;
+do_diagnostic($opt_service) if $opt_diagnostic;
# show help if no action was requested