}
# Check to see if we are already running
- &already_running();
+ &already_running() unless $nosleep;
# Write our pid to the spong tmp directory.
&debug( "caught HUP signal, restarting..." );
unlink "$SPONGTMP/spong-client.pid" if -f "$SPONGTMP/spong-client.pid";
$SIG{$_[0]} = \&hup_handler;
- if( $debug ) { exec $me, "--debug"; } else { exec $me; }
+ if( $debug ) { exec $me, "--debug", $debug; } else { exec $me; }
exit(0);
}
if (! defined $CHECKS || ! $CHECKS ) {
$CHECKS = 'disk cpu processes logs';
- if (defined &check_local) { $CHECKS .= ' local'; }
};
foreach $check (split / /,$CHECKS) {
eval "require 'Spong/Client/plugins/check_$check';";
if ( $@ ) { &error( "Could not load $check check plugin" ); }
}
+
+ if (defined &check_local) {
+ &debug( "Loading client check local", 3 );
+ $CHECKS .= ' local';
+ $CHECKFUNCS{'local'} = \&check_local;
+ }
}
__END__