my($cmd, $host, $service, $color, $summary, $ttl) = @ARGV;
if (! $cmd && defined $opt{'cmd'}) { $cmd = $opt{'cmd'}; }
-if ( $cmd !~ m/status|event/ ) { warn "Invalid cmd\n\n"; &help(); }
+if ( $cmd !~ m/status|event|page/ ) { warn "Invalid cmd\n\n"; &help(); }
if ( ! $host && defined $opt{'host'} ) { $host = $opt{'host'}; }
if ( ! $host ) { warn "Host is required\n\n"; &help(); }
if ( ! $service && defined $opt{'service'} ) { $service = $opt{'service'}; }
} elsif ( $cmd eq 'event') {
Spong::Status::event( $SPONGSERVER, $host, $service, $color, $summary,
$message, $ttl );
+} elsif ( $cmd eq 'page') {
+ Spong::Status::page( $SPONGSERVER, $host, $service, $color, $summary,
+ $message, $ttl );
}
+
exit 0;
sub help {