Quote:
Originally posted by Dontom
Any Idea?
|
Comment out this section:
Code:
# check for previous instance
my $pid=$$;
my $old_pid=0;
if (-e $pid_file) {
open(W,"$pid_file");
$old_pid=<W>;
close(W);
}
open(W,">$pid_file");
print W $pid;
close(W);
my $ps_pid=`/bin/ps xaww | grep newnews.pl | grep -v "grep"`;
$pid=substr($ps_pid,0,5);
if($pid+0 == $old_pid+0){
system("kill -9 $old_pid");
}
Just put in # at the beginning of each of those lines. That code checks to see if the script is already running and if it is, it terminates itself. Apparently the command to check if it's running is not set to give you permissions to run it on your server.