#!/usr/bin/env perl use strict; use warnings; use Inca::Reporter::Version; my $reporter = new Inca::Reporter::Version( name => 'cluster.web.httpd.version', version => 1, description => 'Reports the version of Apache HTTPD', package_name => 'httpd' ); $reporter->addArg( 'httpdPath', 'path to httpd', '/usr/sbin/httpd' ); $reporter->processArgv(@ARGV); my $httpdPath = $reporter->argValue( 'httpdPath' ); $reporter->setVersionByExecutable( "$httpdPath -V", "Apache/([\\S\\.]+)" ); $reporter->print( );
Click here to see help information for the cluster.web.httpd.version reporter.