summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-07-14 21:39:26 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-07-14 21:39:26 +0400
commit58a5b1e417c317d8fa9c232546c0a4faab0e4d48 (patch)
tree73cf348ffb2ebb3720d15e141dfea411b6f4b703
parent91e42a82e859112bbb2ff2aa26115adbb93378cc (diff)
downloaddh-smf-58a5b1e417c317d8fa9c232546c0a4faab0e4d48.tar.gz
Read instances
-rwxr-xr-xdh_smf15
1 files changed, 15 insertions, 0 deletions
diff --git a/dh_smf b/dh_smf
index 0972f21..42525eb 100755
--- a/dh_smf
+++ b/dh_smf
@@ -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