fix backgrounding of mrtg
[spider.git] / cmd / mrtg.pl
index db2d2e1109bb52b641093ea19cff382a52719ca7..466d61134602e58e2f0602415b94d7825e8114f2 100644 (file)
@@ -32,6 +32,8 @@
 sub handle
 {
        my ($self, $line) = @_;
+
+       $DB::single = 1;
        
        # create the arg list
        my %want;
@@ -40,7 +42,7 @@ sub handle
        
        return (1, "MRTG not installed") unless $want{nomrtg} || -e '/usr/bin/mrtg' || -e '/usr/local/bin/mrtg';
 
-       my @out = $self->spawn_cmd("mrtg $line", \&do_it, args=>[%want]);
+       my @out = do_it(%want);
        
        return (1, @out);
 }