Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
:
netflow
>
nfsen
> nfsen-piddir.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File nfsen-piddir.patch of Package nfsen (Revision 5)
Currently displaying revision
5
,
show latest
--- bin/nfsend.orig 2010-02-09 18:13:29.000000000 +0100 +++ bin/nfsend 2010-02-09 18:14:47.000000000 +0100 @@ -745,16 +745,16 @@ # When starting up, check if all the profiles are up to date till the last timeslot # then periodically update the profiles if ( $forever ) { - if ( -f "$NfConf::VARDIR/run/$pidfile" ) { + if ( -f "$NfConf::PIDDIR/$pidfile" ) { # there is a pid file .. check for the process - open PID, "$NfConf::VARDIR/run/$pidfile" || - die "Can't read pid file '$NfConf::VARDIR/run/$pidfile': $!\n"; + open PID, "$NfConf::PIDDIR/$pidfile" || + die "Can't read pid file '$NfConf::PIDDIR/$pidfile': $!\n"; my $pid = <PID>; chomp $pid; close PID; if ( kill( 0, $pid) == 0 ) { print "Unclean shutdown of nfsend[$pid]\n"; - unlink "$NfConf::VARDIR/run/$pidfile"; + unlink "$NfConf::PIDDIR/$pidfile"; } else { print "nfsend[$pid] already running\n"; exit; @@ -766,7 +766,7 @@ # Check if configured sub hierarchy matches CheckSubHierarchy($hints); - daemonize("$NfConf::VARDIR/run/$pidfile"); + daemonize("$NfConf::PIDDIR/$pidfile"); if (!defined($comm_pid = fork)) { print STDERR "cannot fork: $!"; @@ -836,8 +836,8 @@ semctl($semlock, 0, &IPC_RMID, 0); # As daemon remove the pid file, when done -if ( $arg ne 'once' && -f "$NfConf::VARDIR/run/$pidfile" ) { - unlink "$NfConf::VARDIR/run/$pidfile"; +if ( $arg ne 'once' && -f "$NfConf::PIDDIR/$pidfile" ) { + unlink "$NfConf::PIDDIR/$pidfile"; } if ( $reload ) {