summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-12-07 21:21:26 -0500
committersullrich <sullrich@pfsense.org>2009-12-07 21:21:26 -0500
commita6327ffcc1712f929027839bcbf638e51975cf43 (patch)
tree56f539015a2b64fba87c1f11cb11483db05c2db7 /etc
parent886922e7a0c2bc72048d5a63f81ebd4481c78925 (diff)
downloadpfsense-a6327ffcc1712f929027839bcbf638e51975cf43.zip
pfsense-a6327ffcc1712f929027839bcbf638e51975cf43.tar.gz
Only kill processes if they are running
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index a8ded09..19bc5cc 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -39,7 +39,9 @@
*/
function services_parse_dhcpd_hostnames() {
- exec("kill `ps awux | grep isc | grep -v grep | grep parse | awk '{ print $2 }'`");
+ $ps = `ps awux | grep isc | grep -v grep | grep parse | awk '{ print $2 }'`;
+ if($ps)
+ exec("kill {$ps}");
mwexec_bg("sh /etc/rc.parse-isc-dhcpd");
}
OpenPOWER on IntegriCloud