Hello,

I forgot to change the file to unlink in this changes. It is written in bold.


***** ACTUAL *******
        # Check if NfSen is already running
        if ( -f "$NfConf::PIDDIR/nfsend.pid" ) {
                open PID, "$NfConf::PIDDIR/nfsend.pid" ||
                        die "Can't read pid file
'$NfConf::PIDDIR/nfsend.pid': $!\n";
                my $pid = <PID>;
                chomp $pid;
                close PID;
                if ( kill( 0, $pid) == 1  ) {
                        print "NfSen is already running!\n";
                        return;
                } else {
                        print "Unclean shutdown - run stop sequence first
to clean up!\n";
                        NfSen_stop();
                }
        }

***** CHANGES *******
        # Check if NfSen is already running
        if ( -f "$NfConf::PIDDIR/nfsend.pid" ) {
                open PID, "$NfConf::PIDDIR/nfsend.pid" ||
                        die "Can't read pid file
'$NfConf::PIDDIR/nfsend.pid': $!\n";
                my $pid = <PID>;
                close PID;

        if ($pid) {
                        chomp $pid;
                           if ( kill( 0, $pid) == 1  ) {
                                print "NfSen is already running!\n";
                                return;
                        } else {
                                print "Unclean shutdown - run stop sequence
first to clean up!\n";
                                NfSen_stop();
                        }
                } else {
                        *unlink "$NfConf::PIDDIR/nfsend.pid";*
                }
        }




​Thank you very much and regards.

Alfredo Nacino​

Reply via email to