aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-dev/haproxy_global.php
diff options
context:
space:
mode:
authorthompsa <andy@fud.org.nz>2010-02-11 10:06:38 +1300
committerthompsa <andy@fud.org.nz>2010-02-11 10:07:02 +1300
commit9636654ae8fa83433e7a446bc0a56112f660dade (patch)
tree36cf83ff076d1adde8f60dc257620159231d9052 /config/haproxy-dev/haproxy_global.php
parentbb6896c3c1f41a8a04f3bfc9dfafe92bb400ec2a (diff)
downloadpfsense-packages-9636654ae8fa83433e7a446bc0a56112f660dade.tar.gz
pfsense-packages-9636654ae8fa83433e7a446bc0a56112f660dade.tar.bz2
pfsense-packages-9636654ae8fa83433e7a446bc0a56112f660dade.zip
Add syslog facility and level to the global options.
Diffstat (limited to 'config/haproxy-dev/haproxy_global.php')
-rwxr-xr-xconfig/haproxy-dev/haproxy_global.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/config/haproxy-dev/haproxy_global.php b/config/haproxy-dev/haproxy_global.php
index 9de45fdb..f7864a4d 100755
--- a/config/haproxy-dev/haproxy_global.php
+++ b/config/haproxy-dev/haproxy_global.php
@@ -76,6 +76,8 @@ if ($_POST) {
$config['installedpackages']['haproxy']['synchost2'] = $_POST['synchost2'] ? $_POST['synchost2'] : false;
$config['installedpackages']['haproxy']['synchost2'] = $_POST['synchost3'] ? $_POST['synchost3'] : false;
$config['installedpackages']['haproxy']['remotesyslog'] = $_POST['remotesyslog'] ? $_POST['remotesyslog'] : false;
+ $config['installedpackages']['haproxy']['logfacility'] = $_POST['logfacility'] ? $_POST['logfacility'] : false;
+ $config['installedpackages']['haproxy']['loglevel'] = $_POST['loglevel'] ? $_POST['loglevel'] : false;
$config['installedpackages']['haproxy']['syncpassword'] = $_POST['syncpassword'] ? $_POST['syncpassword'] : false;
$config['installedpackages']['haproxy']['advanced'] = base64_encode($_POST['advanced']) ? $_POST['advanced'] : false;
$config['installedpackages']['haproxy']['nbproc'] = $_POST['nbproc'] ? $_POST['nbproc'] : false;
@@ -94,9 +96,17 @@ $pconfig['synchost1'] = $config['installedpackages']['haproxy']['synchost1'];
$pconfig['synchost2'] = $config['installedpackages']['haproxy']['synchost2'];
$pconfig['synchost3'] = $config['installedpackages']['haproxy']['synchost3'];
$pconfig['remotesyslog'] = $config['installedpackages']['haproxy']['remotesyslog'];
+$pconfig['logfacility'] = $config['installedpackages']['haproxy']['logfacility'];
+$pconfig['loglevel'] = $config['installedpackages']['haproxy']['loglevel'];
$pconfig['advanced'] = base64_decode($config['installedpackages']['haproxy']['advanced']);
$pconfig['nbproc'] = $config['installedpackages']['haproxy']['nbproc'];
+// defaults
+if (!$pconfig['logfacility'])
+ $pconfig['logfacility'] = 'local0';
+if (!$pconfig['loglevel'])
+ $pconfig['loglevel'] = 'info';
+
$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
if(strstr($pfSversion, "1.2"))
$one_two = true;
@@ -221,6 +231,46 @@ function enable_change(enable_change) {
</td>
</tr>
<tr>
+ <td valign="top" class="vncell">
+ Syslog facility
+ </td>
+ <td class="vtable">
+ <select name="logfacility" class="formfld">
+ <?php
+ $facilities = array("kern", "user", "mail", "daemon", "auth", "syslog", "lpr",
+ "news", "uucp", "cron", "auth2", "ftp", "ntp", "audit", "alert", "cron2",
+ "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7");
+ foreach ($facilities as $f):
+ ?>
+ <option value="<?=$f;?>" <?php if ($f == $pconfig['logfacility']) echo "selected"; ?>>
+ <?=$f;?>
+ </option>
+ <?php
+ endforeach;
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" class="vncell">
+ Syslog level
+ </td>
+ <td class="vtable">
+ <select name="loglevel" class="formfld">
+ <?php
+ $levels = array("emerg", "alert", "crit", "err", "warning", "notice", "info", "debug");
+ foreach ($levels as $l):
+ ?>
+ <option value="<?=$l;?>" <?php if ($l == $pconfig['loglevel']) echo "selected"; ?>>
+ <?=$l;?>
+ </option>
+ <?php
+ endforeach;
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
<td>
&nbsp;
</td>