From c0cf27aacd464a1c7773b257b153d5d2498d1d10 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 28 Apr 2008 05:17:07 +0000 Subject: Reformat file. --- etc/inc/openvpn.inc | 116 ++++++++++++++++++++++++++-------------------------- 1 file changed, 58 insertions(+), 58 deletions(-) (limited to 'etc/inc/openvpn.inc') diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index be88682..25d54c5 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -49,7 +49,7 @@ require_once('util.inc'); function openvpn_delete($mode, $id) { global $g, $config; - $settings = $config['installedpackages']["openvpn$mode"]['config'][$id]; + $settings = $config['installedpackages']['openvpn$mode']['config'][$id]; $mode = $settings['mode']; $ps = $g['varetc_path'] . "/openvpn_{$mode}{$id}.conf"; $ps_id = `ps awux | grep $ps | awk '{ print \$2 }'`; @@ -280,8 +280,7 @@ function openvpn_validate_input_csc($post, $input_errors) { elseif ($post['dhcp_nbtdisable']) $input_errors[] = 'It makes no sense to unselect push reset and configure DHCP options'; - } - else { + } else { if (!empty($post['dhcp_dns'])) { $servers = explode(';', $post['dhcp_dns']); @@ -368,13 +367,13 @@ function openvpn_reconfigure($mode, $id) { mwexec("/sbin/ifconfig tun{$id} name ovpn{$id}"); mwexec("/sbin/ifconfig ovpn{$id} group openvpn"); - $pidfile = $g['varrun_path'] . "/openvpn_{$mode}{$id}.pid"; - $proto = ($settings['protocol'] == 'UDP' ? 'udp' : "tcp-{$mode}"); - $cipher = $settings['crypto']; + $pidfile = $g['varrun_path'] . "/openvpn_{$mode}{$id}.pid"; + $proto = ($settings['protocol'] == 'UDP' ? 'udp' : "tcp-{$mode}"); + $cipher = $settings['crypto']; $openvpn_conf = "dev ovpn{$id}\n"; $openvpn_conf .= "dev-type tun\n"; $openvpn_conf .= "dev-node /dev/tun{$id}\n"; - $openvpn_conf .= <<