]> ruin.nu Git - ndwebbie.git/blobdiff - scripts/fetchdumps.pl
Add the dependencies file
[ndwebbie.git] / scripts / fetchdumps.pl
index a01b58e3ca3e71893cd08ce8bd3b1268136faf16..6d02704a294e29bdaa06f20eb3786a847deaddf5 100755 (executable)
@@ -27,7 +27,9 @@ use DBD::Pg qw(:pg_types);
 
 use LWP::Simple;
 
-use lib qw{/var/www/ndawn/};
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
 use ND::DB;
 
 our $dbh = ND::DB::DB();
@@ -51,12 +53,13 @@ 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);
-       $dbh->do(q{VACUUM ANALYZE});
+       system 'killall','-USR1', 'ndbot.pl';
+       local $dbh->{Warn} = 0;
 }