aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Crane <mcrane@pfsense.org>2009-01-23 04:31:45 +0000
committerMark Crane <mcrane@pfsense.org>2009-01-23 04:31:45 +0000
commita7bd4d599217fcb8f8c3ca368af26b34ed39e3b1 (patch)
tree15d3ca92c6c3391aa05eef59f85770bbbdcb3838
parent9a5d2b00b3016761c6077849c6c093249b36e2b5 (diff)
downloadpfsense-packages-a7bd4d599217fcb8f8c3ca368af26b34ed39e3b1.tar.gz
pfsense-packages-a7bd4d599217fcb8f8c3ca368af26b34ed39e3b1.tar.bz2
pfsense-packages-a7bd4d599217fcb8f8c3ca368af26b34ed39e3b1.zip
PHPService package update wording links, enable/disable entries. Add link to the wiki.
-rw-r--r--packages/phpservice/phpservice.inc14
-rw-r--r--packages/phpservice/phpservice.xml2
-rw-r--r--packages/phpservice/phpservice_php.tmp24
-rw-r--r--packages/phpservice/phpservice_php_edit.tmp33
-rw-r--r--pkg_config.7.xml4
5 files changed, 56 insertions, 21 deletions
diff --git a/packages/phpservice/phpservice.inc b/packages/phpservice/phpservice.inc
index da6ada59..1718981e 100644
--- a/packages/phpservice/phpservice.inc
+++ b/packages/phpservice/phpservice.inc
@@ -121,11 +121,15 @@ function phpservice_sync_package_php()
$tmp .= "\n";
foreach($config['installedpackages']['phpservice']['config'] as $rowhelper) {
-
- $tmp .= "// name: ".$rowhelper['name']." \n";
- $tmp .= "// description: ".$rowhelper['description']." \n\n";
- $tmp .= base64_decode($rowhelper['php']);
- $tmp .= "\n";
+ if ($rowhelper['enabled'] != "false") {
+ $tmp_php = base64_decode($rowhelper['php'];
+ if (strlen($tmp_php) > 0) {
+ $tmp .= "// name: ".$rowhelper['name']." \n";
+ $tmp .= "// description: ".$rowhelper['description']." \n\n";
+ $tmp .= base64_decode($rowhelper['php']);
+ $tmp .= "\n";
+ }
+ }
}
diff --git a/packages/phpservice/phpservice.xml b/packages/phpservice/phpservice.xml
index 2c908be6..7fa9e61a 100644
--- a/packages/phpservice/phpservice.xml
+++ b/packages/phpservice/phpservice.xml
@@ -52,7 +52,7 @@
<url>/packages/phpservice/phpservice_php.php</url>
</menu>
<service>
- <name>PHPService</name>
+ <name>PHP Service</name>
<rcfile>phpservice.sh</rcfile>
<executable>phpservice</executable>
<description>PHP Service</description>
diff --git a/packages/phpservice/phpservice_php.tmp b/packages/phpservice/phpservice_php.tmp
index 21315780..45ecf425 100644
--- a/packages/phpservice/phpservice_php.tmp
+++ b/packages/phpservice/phpservice_php.tmp
@@ -59,7 +59,7 @@ include("head.inc");
<?php
$tab_array = array();
- $tab_array[] = array(gettext("PHP"), false, "/packages/phpservice_php.php");
+ $tab_array[] = array(gettext("Settings"), false, "/packages/phpservice/phpservice_php.php");
display_top_tabs($tab_array);
?>
@@ -87,9 +87,11 @@ if ($config_change == 1) {
?>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
- <td><p><span class="vexpl"><span class="red"><strong>PHP Service<br>
- </strong></span>
- PHP Service is an easy way to monitor Memory, CPU, and files and send events to the system log.
+ <td><p><!--<span class="vexpl"><span class="red"><strong>PHP Service<br></strong></span>-->
+ Is command line PHP designed to run PHP as a Service. The custom PHP code that is defined below is run over and over again inside a continuous loop. There are many possible uses such as monitoring CPU, Memory, File System Space, interacting with Snort, and many others uses that are yet to be discovered.
+ It can send events to the sylog that will can be viewed from the system log or remote syslog server. example: exec("logger This is a test");
+ <br /><br />
+ For more information see: <a href='http://doc.pfsense.org/index.php/PHPService'>http://doc.pfsense.org/index.php/PHPService</a>
</p></td>
</tr>
</table>
@@ -97,8 +99,9 @@ if ($config_change == 1) {
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Name</td>
- <td width="25%" class="listhdr">Description</td>
+ <td width="30%" class="listhdrr">Name</td>
+ <td width="20%" class="listhdrr">Enabled</td>
+ <td width="40%" class="listhdr">Description</td>
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
@@ -109,7 +112,7 @@ if ($config_change == 1) {
</table>
</td>
- </tr>
+ </tr>
<?php
@@ -124,6 +127,9 @@ if ($config_change == 1) {
<td class="listr" ondblclick="document.location='phpservice_php_edit.php?id=<?=$i;?>';">
<?=$ent['name'];?>&nbsp;
</td>
+ <td class="listr" ondblclick="document.location='phpservice_php_edit.php?id=<?=$i;?>';">
+ <?=$ent['enabled'];?>&nbsp;
+ </td>
<td class="listbg" ondblclick="document.location='phpservice_php_edit.php?id=<?=$i;?>';">
<font color="#FFFFFF"><?=htmlspecialchars($ent['description']);?>&nbsp;
</td>
@@ -144,7 +150,7 @@ if ($config_change == 1) {
?>
<tr>
- <td class="list" colspan="2"></td>
+ <td class="list" colspan="3"></td>
<td class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -157,7 +163,7 @@ if ($config_change == 1) {
<tr>
- <td class="list" colspan="2"></td>
+ <td class="list" colspan="3"></td>
<td class="list"></td>
</tr>
</table>
diff --git a/packages/phpservice/phpservice_php_edit.tmp b/packages/phpservice/phpservice_php_edit.tmp
index fcc163bd..070c87d1 100644
--- a/packages/phpservice/phpservice_php_edit.tmp
+++ b/packages/phpservice/phpservice_php_edit.tmp
@@ -43,6 +43,7 @@ if (isset($id) && $a_phpservice[$id]) {
$pconfig['name'] = $a_phpservice[$id]['name'];
$pconfig['php'] = base64_decode($a_phpservice[$id]['php']);
+ $pconfig['enabled'] = $a_phpservice[$id]['enabled'];
$pconfig['description'] = $a_phpservice[$id]['description'];
}
@@ -56,7 +57,8 @@ if ($_POST) {
$ent = array();
$ent['name'] = $_POST['name'];
- $ent['php'] = base64_encode($_POST['php']);
+ $ent['php'] = base64_encode($_POST['php']);
+ $ent['enabled'] = $_POST['enabled'];
$ent['description'] = $_POST['description'];
if (isset($id) && $a_phpservice[$id]) {
@@ -100,7 +102,7 @@ function show_advanced_config() {
<?php
$tab_array = array();
- $tab_array[] = array(gettext("PHP"), false, "/packages/phpservice_php.php");
+ $tab_array[] = array(gettext("Settings"), false, "/packages/phpservice/phpservice_php.php");
display_top_tabs($tab_array);
?>
@@ -135,7 +137,7 @@ function show_advanced_config() {
<td width="22%" valign="top" class="vncell">PHP</td>
<td width="78%" class="vtable">
<?php
- echo "<textarea name=\"php\" id=\"php\" cols=\"70\" rows=\"7\" wrap=\"off\">".htmlspecialchars($pconfig['php'])."</textarea>\n";
+ echo "<textarea name=\"php\" id=\"php\" cols=\"70\" rows=\"15\" wrap=\"off\">".htmlspecialchars($pconfig['php'])."</textarea>\n";
?>
<!--
<br>
@@ -149,7 +151,30 @@ function show_advanced_config() {
-->
</td>
</tr>
-
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Enabled</td>
+ <td width="78%" class="vtable">
+ <?php
+ echo " <select name='enabled' class='formfld'>\n";
+ echo " <option></option>\n";
+ switch (htmlspecialchars($pconfig['enabled'])) {
+ case "true":
+ echo " <option value='true' selected='yes'>true</option>\n";
+ echo " <option value='false'>false</option>\n";
+ break;
+ case "false":
+ echo " <option value='true'>true</option>\n";
+ echo " <option value='false' selected='yes'>false</option>\n";
+
+ break;
+ default:
+ echo " <option value='true' selected='yes'>true</option>\n";
+ echo " <option value='false'>false</option>\n";
+ }
+ echo " </select>\n";
+ ?>
+ </td>
+ </tr>
<tr>
<td width="25%" valign="top" class="vncellreq">Description</td>
<td width="75%" class="vtable">
diff --git a/pkg_config.7.xml b/pkg_config.7.xml
index ba741613..4b50bd76 100644
--- a/pkg_config.7.xml
+++ b/pkg_config.7.xml
@@ -91,10 +91,10 @@
<website></website>
<descr>Customizable PHP service that can monitor memory, CPU, files and send alerts to the syslog.</descr>
<category>Services</category>
- <pkginfolink></pkginfolink>
+ <pkginfolink>http://doc.pfsense.org/index.php/PHPService</pkginfolink>
<config_file>http://www.pfsense.com/packages/config/phpservice/phpservice.xml</config_file>
<depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url>
- <version>0.2.7</version>
+ <version>0.2.8</version>
<status>Alpha</status>
<required_version>1.2.1</required_version>
<maintainer>markjcrane@gmail.com</maintainer>