diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-07-14 21:39:26 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-07-14 21:39:26 +0400 |
commit | 58a5b1e417c317d8fa9c232546c0a4faab0e4d48 (patch) | |
tree | 73cf348ffb2ebb3720d15e141dfea411b6f4b703 | |
parent | 91e42a82e859112bbb2ff2aa26115adbb93378cc (diff) | |
download | dh-smf-58a5b1e417c317d8fa9c232546c0a4faab0e4d48.tar.gz |
Read instances
-rwxr-xr-x | dh_smf | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -184,6 +184,21 @@ foreach my $package ( @{ $dh{DOPACKAGES} } ) { ->{'duration'}->{'value'} // 'contract', }; } + if ( exists $xml->{'service'}->{'instance'} ) { + while ( my ( $k, $v ) = each %{ $xml->{'service'}->{'instance'} } ) + { + push @services, + { + 'name' => "$service_base:$k", + 'enabled' => $v->{'enabled'}, + 'exec_method' => $v->{'exec_method'} + // $xml->{'service'}->{'exec_method'}, + 'duration' => + $v->{'property_group'}->{'startd'}->{'propval'} + ->{'duration'}->{'value'} // 'contract', + }; + } + } } print Dumper(@services); # debug |