diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-11-17 20:38:39 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-11-17 20:38:39 -0500 |
commit | ff1bf1c26f491b8cd10f1c47c0c491eeda29b0f6 (patch) | |
tree | e3aba8902bc70c5e092a062b6b9d3ad1f59a8bb7 /config/haproxy | |
parent | 938d9a78d415888c6ff6713bd6a3a1d4f7475d6f (diff) | |
download | pfsense-packages-ff1bf1c26f491b8cd10f1c47c0c491eeda29b0f6.tar.gz pfsense-packages-ff1bf1c26f491b8cd10f1c47c0c491eeda29b0f6.tar.bz2 pfsense-packages-ff1bf1c26f491b8cd10f1c47c0c491eeda29b0f6.zip |
Save and restore correctly
Diffstat (limited to 'config/haproxy')
-rwxr-xr-x | config/haproxy/haproxy_global.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/config/haproxy/haproxy_global.php b/config/haproxy/haproxy_global.php index 5b00b644..609c4b4e 100755 --- a/config/haproxy/haproxy_global.php +++ b/config/haproxy/haproxy_global.php @@ -38,13 +38,6 @@ $d_haproxyconfdirty_path = $g['varrun_path'] . "/haproxy.conf.dirty"; if (!is_array($config['installedpackages']['haproxy'])) $config['installedpackages']['haproxy'] = array(); -$pconfig['enable'] = isset($config['installedpackages']['haproxy']['enable']); -$pconfig['maxconn'] = $config['installedpackages']['haproxy']['maxconn']; -$pconfig['enablesync'] = isset($config['installedpackages']['haproxy']['enablesync']); -$pconfig['syncpassword'] = $config['installedpackages']['haproxy']['syncpassword']; -$pconfig['synchost1'] = $config['installedpackages']['haproxy']['synchost1']; -$pconfig['synchost2'] = $config['installedpackages']['haproxy']['synchost2']; -$pconfig['synchost3'] = $config['installedpackages']['haproxy']['synchost3']; if ($_POST) { unset($input_errors); @@ -82,6 +75,7 @@ if ($_POST) { $config['installedpackages']['haproxy']['synchost1'] = $_POST['synchost1'] ? $_POST['synchost1'] : false; $config['installedpackages']['haproxy']['synchost2'] = $_POST['synchost2'] ? $_POST['synchost2'] : false; $config['installedpackages']['haproxy']['synchost2'] = $_POST['synchost3'] ? $_POST['synchost3'] : false; + $config['installedpackages']['haproxy']['syncpassword'] = $_POST['syncpassword'] ? $_POST['syncpassword'] : false; touch($d_haproxyconfdirty_path); write_config(); } @@ -89,6 +83,14 @@ if ($_POST) { } +$pconfig['enable'] = isset($config['installedpackages']['haproxy']['enable']); +$pconfig['maxconn'] = $config['installedpackages']['haproxy']['maxconn']; +$pconfig['enablesync'] = isset($config['installedpackages']['haproxy']['enablesync']); +$pconfig['syncpassword'] = $config['installedpackages']['haproxy']['syncpassword']; +$pconfig['synchost1'] = $config['installedpackages']['haproxy']['synchost1']; +$pconfig['synchost2'] = $config['installedpackages']['haproxy']['synchost2']; +$pconfig['synchost3'] = $config['installedpackages']['haproxy']['synchost3']; + $pfSversion = str_replace("\n", "", file_get_contents("/etc/version")); if(strstr($pfSversion, "1.2")) $one_two = true; @@ -212,7 +214,7 @@ function enable_change(enable_change) { <tr> <td width="22%" valign="top" class="vncell">Sync host #1</td> <td width="78%" class="vtable"> - <input name="enablesync" value="<?=$pconfig['synchost1'];?>"> + <input name="synchost1" value="<?=$pconfig['synchost1'];?>"> <br/> <strong>Synchronize settings to this hosts IP address.</strong> </td> @@ -220,7 +222,7 @@ function enable_change(enable_change) { <tr> <td width="22%" valign="top" class="vncell">Sync host #2</td> <td width="78%" class="vtable"> - <input name="enablesync" value="<?=$pconfig['synchost2'];?>"> + <input name="synchost2" value="<?=$pconfig['synchost2'];?>"> <br/> <strong>Synchronize settings to this hosts IP address.</strong> </td> @@ -228,7 +230,7 @@ function enable_change(enable_change) { <tr> <td width="22%" valign="top" class="vncell">Sync host #3</td> <td width="78%" class="vtable"> - <input name="enablesync" value="<?=$pconfig['synchost3'];?>"> + <input name="synchost3" value="<?=$pconfig['synchost3'];?>"> <br/> <strong>Synchronize settings to this hosts IP address.</strong> </td> |