--restart
Signal a running spong-server to restart.
--kill
- Signal a running spong-server to terminated.
+ Signal a running spong-server to terminate.
config_file
Use the named file as configuration file.
);
);
if (! defined $sock ) { die "socket: $!"; }
+ my( $next_update ) = time() + (15 * 60);
+
&debug( "query server socket setup, listening for connections" );
while( 1 ) {
+ # Update the service list from the database every 15 minutes
+ if ( $time >= $next_update ) {
+ foreach $host ( Spong::HostList->new( "all" )->hosts() ) {
+ foreach $service ( $host->service_names() ) {
+ $main::SERVICES{$service}=1;}}
+ $next_update =+ 15 * 60;
+ }
next unless ( $client = $sock->accept() );
my $paddr = $client->peerhost();
Spong::Log::set_error_context( syslog => $syslog,
ident => 'spong-server',
- logopt => 'pid cons',
+ logopt => 'pid,cons',
priority => 'ERR',
filename => $filename,
);