iControl 101 - #15 - System Services
This installment of iControl 101, I'll focus on the System Service interface where you can have full control of the running state of all the services on the system. Initialization This article...
Published May 29, 2008
Version 1.0mariogolf_57851
Apr 09, 2010Nimbostratus
This routine returns a failure: Cannot convert a struct to a string.
can you assist please?
Thank you very much for the previous example. Very helpful!
:)
----------------------------------------------------------------------------
Subroutine: set_service
Purpose: Sets the service status for a service
----------------------------------------------------------------------------
sub set_service()
{
my ($servicetype, $serviceaction) = (@_);
print "servicetype $servicetype, serviceaction $serviceaction\n";
if (!($servicetype)) { &usage(); }
if (!($serviceaction)) { &usage(); }
$soapResponse = $System->set_service
(
SOAP::Data->name(services => [$servicetype]),
SOAP::Data->name(service_action => [$serviceaction])
);
if ( $soapResponse->fault )
{
print $soapResponse->faultcode, " ", $soapResponse->faultstring, "\n";
}
else
{
&get_service_status($servicetype);
}
return(0);
}