]> git.etc.gen.nz Git - spong.git/commitdiff
added 'page' message type support
authorStephen L Johnson <sjohnson@monsters.org>
Tue, 22 Feb 2000 05:17:36 +0000 (05:17 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Tue, 22 Feb 2000 05:17:36 +0000 (05:17 +0000)
src/spong-status.pl

index 6a4b2af1bdb281385dc7fca911bb760505ed4e15..7a64ac6e3e60c70dcc06807faed85cee00efea63 100755 (executable)
@@ -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 {