diff options
author | Ermal <eri@pfsense.org> | 2013-02-05 16:05:51 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-05 16:05:51 +0000 |
commit | fe2eb9952ffad4949f00c4c27487906cf02793a5 (patch) | |
tree | 61125e9524c945cb91364cc0718c72fdfad77a66 /etc | |
parent | a11bc49704f084ff24ef0b72ad69080ee562590f (diff) | |
download | pfsense-fe2eb9952ffad4949f00c4c27487906cf02793a5.zip pfsense-fe2eb9952ffad4949f00c4c27487906cf02793a5.tar.gz |
Unlink pid file before starting a new process
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/captiveportal.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 6f9461c..abdc3de 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -424,12 +424,15 @@ function captiveportal_init_webgui_zone($cpcfg) { "", "", "", "lighty-{$cpzone}-CaptivePortal.pid", $listenporthttp, "/usr/local/captiveportal", "", "", $cpzone); + @unlink("{$g['varrun']}/lighty-{$cpzone}-CaptivePortal.pid"); /* attempt to start lighttpd */ $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal.conf"); /* fire up https instance */ - if (isset($cpcfg['httpslogin'])) + if (isset($cpcfg['httpslogin'])) { + @unlink("{$g['varrun']}/lighty-{$cpzone}-CaptivePortal-SSL.pid"); $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal-SSL.conf"); + } } /* reinit will disconnect all users, be careful! */ |