#!/usr/bin/perl -wT # (c) 2002 Peter Palfrader # $Id: pingd,v 1.3 2002/06/11 10:10:34 weasel Exp $ # use strict; use XML::Parser; use XML::Dumper; use Getopt::Long; use lib '.'; use Echolot::Config; use Echolot::Globals; use Echolot::Storage::File; use Echolot::Scheduler; use Echolot::Conf; use Echolot::Mailin; use Echolot::Pinger; $ENV{'PATH'} = '/bin:/usr/bin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; Echolot::Config::init(); Echolot::Globals::init(); my $scheduler = new Echolot::Scheduler; $scheduler->add('processmail' , 60 , 0, \&Echolot::Mailin::process ); $scheduler->add('getkeyconf' , 10*60 , 0, \&Echolot::Conf::send_requests ); $scheduler->add('ping' , Echolot::Config::get()->{'pinger_interval'}, 0, \&Echolot::Pinger::send_pings ); $scheduler->run(); #Echolot::Globals::get()->{'storage'}->commit(); # vim: set ts=4 shiftwidth=4: