From 062676f880878f788315991de861a71ccb86a478 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 23 May 2012 19:25:53 +0000 Subject: Fixes #2364. On busy pppoe servers it might take some time before mpd exits. Check for this before trying to restart --- etc/inc/vpn.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'etc/inc/vpn.inc') diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index b8ba7c8..0325c0d 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -1454,6 +1454,10 @@ EOD; chmod("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.secret", 0600); } + /* Check if previous instance is still up */ + while (file_exists("{$g['varrun_path']}/pppoe{$pppoecfg['pppoeid']}-vpn.pid") && isvalidpid("{$g['varrun_path']}/pppoe{$pppoecfg['pppoeid']}-vpn.pid")) + killbypid("{$g['varrun_path']}/pppoe{$pppoecfg['pppoeid']}-vpn.pid"); + /* Get support for netgraph(4) from the nic */ pfSense_ngctl_attach(".", $pppoe_interface); /* fire up mpd */ -- cgit v1.1