]> ruin.nu Git - ndwebbie.git/blobdiff - scripts/tick.pl
Need to signal ndbot.pl instead of irssi
[ndwebbie.git] / scripts / tick.pl
index bb652a875ab16a0528ad719831cf419dd8601918..cf9f67a601b005b9e76ffc07f13ef6f0946d462b 100755 (executable)
@@ -7,17 +7,14 @@ use DBD::Pg qw(:pg_types);
 
 use LWP::Simple;
 
-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 FindBin;
+use lib "$FindBin::Bin/../lib";
+
+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;