X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=scripts%2Ftick.pl;h=c31606058b1cd11677afad5c23a4ce7736d26978;hb=36a13cae169413fc04fbf704d94a2ad797336e6e;hp=bb652a875ab16a0528ad719831cf419dd8601918;hpb=7f3967a69a1b021050933e828d60d22b52589d89;p=ndwebbie.git diff --git a/scripts/tick.pl b/scripts/tick.pl index bb652a8..c316060 100755 --- a/scripts/tick.pl +++ b/scripts/tick.pl @@ -2,22 +2,18 @@ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); -use LWP::Simple; +use FindBin; +use lib "$FindBin::Bin/../lib"; -our $dbh; -for my $file ("/home/whale/db.pl") -{ - unless (my $return = do $file){ - warn "couldn't parse $file: $@" if $@; - warn "couldn't do $file: $!" unless defined $return; - warn "couldn't run $file" unless $return; - } -} +use ND::DB; + +our $dbh = ND::DB::DB(); -$dbh->trace("0","/tmp/scanstest"); my $update = $dbh->prepare("UPDATE misc SET value = value::int + 1 WHERE id = 'TICK'"); $update->execute(); +system 'killall','-USR1', 'ndbot.pl'; $dbh->disconnect;