Check to see if the pid file exists before trying to kill anyprocess

This commit is contained in:
Ermal 2012-01-24 20:03:58 +00:00
parent 9fd145911d
commit d224df189c

View File

@ -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'])) {