From d224df189c8b1320a9d408db93afe4ce1a80970b Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 24 Jan 2012 20:03:58 +0000 Subject: [PATCH] Check to see if the pid file exists before trying to kill anyprocess --- etc/inc/services.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/inc/services.inc b/etc/inc/services.inc index c49b929e81..d1e8d86c7a 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -1278,7 +1278,8 @@ function services_dnsmasq_configure() { } /* kill any running dnsmasq */ - sigkillbypid("{$g['varrun_path']}/dnsmasq.pid", "TERM"); + if (file_exists("{$g['varrun_path']}/dnsmasq.pid")) + sigkillbypid("{$g['varrun_path']}/dnsmasq.pid", "TERM"); if (isset($config['dnsmasq']['enable'])) {