X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=scripts%2Ftick.pl;fp=scripts%2Ftick.pl;h=6b97aa125445f78c3af359ff7c3f36d7a4a798a3;hb=83be73d01437ba9841257bb9064314d63fab9487;hp=bb652a875ab16a0528ad719831cf419dd8601918;hpb=cfd127565c8e441c9baa8f692f1e81d1f525cd76;p=ndwebbie.git diff --git a/scripts/tick.pl b/scripts/tick.pl index bb652a8..6b97aa1 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/}; +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;