#!/usr/local/bin/perl print <<'END_OF_HTTP'; Content-type: text/plain #!/usr/local/bin/perl require 'libhuginn.pl'; $checkmode = 1; $DEBUG = 0; while($ARGV[0]){ $_ = shift(@ARGV); if(/-nocheck/){$checkmode = 0;} if(/-fullcheck/){$checkmode = 1;} if(/-remoteonly/){$checkmode = 2;} if(/-debug/){$DEBUG = 1;} if(/-rcfile/){ if($_ eq "-rcfile"){ $_ = shift(@ARGV); $rcfile = $_; }else{ /-rcfile(.*)/; $rcfile = $1; } } } print "use huginn: $libhuginn::agentname\n"; print "use rcfile: $libhuginn::rcfile\n"; print "Check mode: $checkmode\n"; &libhuginn::setCheckMode($checkmode); &libhuginn::openLOG(); &libhuginn::readtimeDB(); &libhuginn::readRCfile(); if($checkmode == 1){ &libhuginn::RemoteCheck(); &libhuginn::nonRemoteCheck(); }elsif($checkmode == 2){ &libhuginn::RemoteCheck(); } &libhuginn::mergeTimeDB(); &libhuginn::output(); &libhuginn::writetimeDB(); &libhuginn::closeLOG(); exit(0); END_OF_HTTP