X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=scripts%2Ftick.pl;h=5f8b86267ad15edbfa9fb61c4cba3ee1b4413b09;hb=02c7aaff53da28137793c89c32d9994b93db61fb;hp=bb652a875ab16a0528ad719831cf419dd8601918;hpb=ee9b38473af96baf1b084b962f3407e7e5f419ef;p=ndwebbie.git diff --git a/scripts/tick.pl b/scripts/tick.pl index bb652a8..5f8b862 100755 --- a/scripts/tick.pl +++ b/scripts/tick.pl @@ -7,17 +7,11 @@ 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 lib qw{/var/www/ndawn/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(); $dbh->disconnect;