From: Stephen L Johnson Date: Tue, 22 Feb 2000 05:17:36 +0000 (+0000) Subject: added 'page' message type support X-Git-Tag: spong-2_7-alpha5~77 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc87d98b2f6e6c214dfe8bdf47a21c7fd1e9d25a;p=spong.git added 'page' message type support --- diff --git a/src/spong-status.pl b/src/spong-status.pl index 6a4b2af..7a64ac6 100755 --- a/src/spong-status.pl +++ b/src/spong-status.pl @@ -42,7 +42,7 @@ if( ! GetOptions( \%opt, @options ) ) { warn "Incorrect usage:\n\n"; &help(); } 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'}; } @@ -80,9 +80,13 @@ if ( $cmd eq 'status' ) { } 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 {