summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2011-03-17 08:17:22 +0000
committerPaul Buetow <paul@buetow.org>2011-03-17 08:17:22 +0000
commitc961479585e15a796a29e812a8abf15412521532 (patch)
treef47d15cbe8f4511ef46c54f311329fa0b60ccc08
parent4bf381359a34e48bf69d3bcbb9200f8bd463648c (diff)
added extra pidfile checking on shutdown
-rw-r--r--PerlDaemon/PerlDaemon.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/PerlDaemon/PerlDaemon.pl b/PerlDaemon/PerlDaemon.pl
index f45f587..240134d 100644
--- a/PerlDaemon/PerlDaemon.pl
+++ b/PerlDaemon/PerlDaemon.pl
@@ -120,7 +120,7 @@ sub sighandlers ($) {
$SIG{TERM} = sub {
# On shutdown
$logger->logmsg('Received SIGTERM. Shutting down....');
- unlink $conf->{'daemon.pidfile'};
+ unlink $conf->{'daemon.pidfile'} if -f $conf->{'daemon.pidfile'};
exit 0;
};