diff options
author | Ermal <eri@pfsense.org> | 2013-02-05 16:07:17 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-05 16:07:17 +0000 |
commit | 7b2c22a956546f7b1b0ba48e1477be4802f55dc7 (patch) | |
tree | 5ed65ea0f5dc72396a67652865435e9de5aea2e9 | |
parent | 506c6bee8994ed17f16c56a5c7e2ed4085f76846 (diff) | |
download | pfsense-7b2c22a956546f7b1b0ba48e1477be4802f55dc7.zip pfsense-7b2c22a956546f7b1b0ba48e1477be4802f55dc7.tar.gz |
Unlink pid file before starting a new process
-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 4f6fb3e..8b1381b 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -416,12 +416,15 @@ function captiveportal_init_webgui() { "", "", "", "lighty-CaptivePortal.pid", "8000", "/usr/local/captiveportal/", "cert-portal.pem", "ca-portal.pem", 1, true); + @unlink("{$g['varrun_path']}/lighty-CaptivePortal.pid"); /* attempt to start lighttpd */ $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-CaptivePortal.conf"); /* fire up https instance */ - if (isset($config['captiveportal']['httpslogin'])) + if (isset($config['captiveportal']['httpslogin'])) { + @unlink("{$g['varrun_path']}/lighty-CaptivePortal-SSL.pid"); $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-CaptivePortal-SSL.conf"); + } } /* reinit will disconnect all users, be careful! */ |