X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=scripts%2Ffetchdumps.pl;h=1bb0736fb3093e04bbd51069f203666a43df77ed;hb=d9c77fa710e898c2fd3bf7ac2459b59b88ac44f5;hp=2579f38532688463e9b3a7a4ad07f0c6da32f7eb;hpb=5b6c3c7d0003d636c1c3da6d25734e4aad5736a5;p=ndwebbie.git diff --git a/scripts/fetchdumps.pl b/scripts/fetchdumps.pl index 2579f38..1bb0736 100755 --- a/scripts/fetchdumps.pl +++ b/scripts/fetchdumps.pl @@ -27,7 +27,9 @@ use DBD::Pg qw(:pg_types); use LWP::Simple; -use lib qw{/var/www/ndawn/lib/}; +use FindBin; +use lib "$FindBin::Bin/../lib"; + use ND::DB; our $dbh = ND::DB::DB(); @@ -51,11 +53,12 @@ for my $type ("planet","alliance","galaxy"){ } if ($updated){ - `/var/www/ndawn/scripts/parsealliances.pl $updated`; - `/var/www/ndawn/scripts/parseplanets.pl $updated`; - `/var/www/ndawn/scripts/parsegalaxies.pl $updated`; - `/var/www/ndawn/scripts/ndrank.pl`; + `perl $FindBin::Bin/parsealliances.pl $updated`; + `perl $FindBin::Bin/parseplanets.pl $updated`; + `perl $FindBin::Bin/parsegalaxies.pl $updated`; + `perl $FindBin::Bin/ndrank.pl`; $dbh->do(q{UPDATE misc SET value = ? WHERE id = 'TICK'}, undef, $updated); + system 'killall','-USR1', 'irssi'; local $dbh->{Warn} = 0; $dbh->do(q{VACUUM ANALYZE}); }