Commit 14a40cf7 authored by Franco Fichtner's avatar Franco Fichtner

vpn: fix and improve service probing

parent 4bffccf8
...@@ -45,7 +45,7 @@ function vpn_services() ...@@ -45,7 +45,7 @@ function vpn_services()
$services = array(); $services = array();
if (isset($config['pptpd']['mode']) && $config['pptpd']['mode'] != 'off') { if (isset($config['pptpd']['mode']) && $config['pptpd']['mode'] == 'server') {
$services[] = array( $services[] = array(
'description' => gettext('PPTP Server'), 'description' => gettext('PPTP Server'),
'pidfile' => '/var/run/pptp-vpn.pid', 'pidfile' => '/var/run/pptp-vpn.pid',
...@@ -57,7 +57,7 @@ function vpn_services() ...@@ -57,7 +57,7 @@ function vpn_services()
); );
} }
if (isset($config['l2tp']['mode']) && $config['l2tp']['mode'] != 'off') { if (isset($config['l2tp']['mode']) && $config['l2tp']['mode'] == 'server') {
$services[] = array( $services[] = array(
'description' => gettext('L2TP Server'), 'description' => gettext('L2TP Server'),
'pidfile' => '/var/run/l2tp-vpn.pid', 'pidfile' => '/var/run/l2tp-vpn.pid',
...@@ -71,7 +71,7 @@ function vpn_services() ...@@ -71,7 +71,7 @@ function vpn_services()
if (isset($config['pppoes']['pppoe'])) { if (isset($config['pppoes']['pppoe'])) {
foreach ($config['pppoes']['pppoe'] as $pppoecfg) { foreach ($config['pppoes']['pppoe'] as $pppoecfg) {
if (isset($pppoecfg['mode']) || $pppoecfg['mode'] != 'off') { if (isset($pppoecfg['mode']) && $pppoecfg['mode'] == 'server') {
$services[] = array( $services[] = array(
'description' => gettext('PPPoE Server') . ': ' . htmlspecialchars($pppoecfg['descr']), 'description' => gettext('PPPoE Server') . ': ' . htmlspecialchars($pppoecfg['descr']),
'php' => array( 'php' => array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment