aboutsummaryrefslogtreecommitdiffstats
path: root/packages/p3scan-pf/p3scan-pf.inc
diff options
context:
space:
mode:
authorDaniel Stefan Haischt <dsh@pfsense.org>2006-08-05 03:38:54 +0000
committerDaniel Stefan Haischt <dsh@pfsense.org>2006-08-05 03:38:54 +0000
commit4b2689545c80d1c4049466223f0e83673934d3cc (patch)
tree75cfda18ddd46f97c2664ee2fae68ecd4fd185cc /packages/p3scan-pf/p3scan-pf.inc
parent23a910fa21d4399f14f48977e8927563814f518c (diff)
downloadpfsense-packages-4b2689545c80d1c4049466223f0e83673934d3cc.tar.gz
pfsense-packages-4b2689545c80d1c4049466223f0e83673934d3cc.tar.bz2
pfsense-packages-4b2689545c80d1c4049466223f0e83673934d3cc.zip
- fix: only remove the PID file if the service is _not_ running
Diffstat (limited to 'packages/p3scan-pf/p3scan-pf.inc')
-rw-r--r--packages/p3scan-pf/p3scan-pf.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/p3scan-pf/p3scan-pf.inc b/packages/p3scan-pf/p3scan-pf.inc
index e35e8a36..599f5650 100644
--- a/packages/p3scan-pf/p3scan-pf.inc
+++ b/packages/p3scan-pf/p3scan-pf.inc
@@ -311,7 +311,8 @@ EOD;
mwexec("/usr/local/etc/rc.d/030.p3scan.sh stop");
/* test whether a pid file still exists and remove it if necessary */
- unlink_if_exists("/var/run/p3scan/p3scan.pid");
+ if (! is_service_running("p3scan-pf"))
+ unlink_if_exists("/var/run/p3scan/p3scan.pid");
mwexec("/usr/local/etc/rc.d/030.p3scan.sh start");
return 0;