From a7bd4d599217fcb8f8c3ca368af26b34ed39e3b1 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 23 Jan 2009 04:31:45 +0000 Subject: PHPService package update wording links, enable/disable entries. Add link to the wiki. --- packages/phpservice/phpservice.inc | 14 +++++++----- packages/phpservice/phpservice.xml | 2 +- packages/phpservice/phpservice_php.tmp | 24 +++++++++++++-------- packages/phpservice/phpservice_php_edit.tmp | 33 +++++++++++++++++++++++++---- 4 files changed, 54 insertions(+), 19 deletions(-) (limited to 'packages/phpservice') 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 @@ /packages/phpservice/phpservice_php.php - PHPService + PHP Service phpservice.sh phpservice PHP Service 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"); @@ -87,9 +87,11 @@ if ($config_change == 1) { ?> -

PHP Service
-
- PHP Service is an easy way to monitor Memory, CPU, and files and send events to the system log. +

+ 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"); +

+ For more information see: http://doc.pfsense.org/index.php/PHPService

@@ -97,8 +99,9 @@ if ($config_change == 1) { - - + + + - + ';">   + @@ -144,7 +150,7 @@ if ($config_change == 1) { ?> - + - + + + +
NameDescriptionNameEnabledDescription @@ -109,7 +112,7 @@ if ($config_change == 1) {
+   +  
@@ -157,7 +163,7 @@ if ($config_change == 1) { - +
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() { @@ -135,7 +137,7 @@ function show_advanced_config() {
PHP ".htmlspecialchars($pconfig['php'])."\n"; + echo "\n"; ?>
Enabled + \n"; + echo " \n"; + switch (htmlspecialchars($pconfig['enabled'])) { + case "true": + echo " \n"; + echo " \n"; + break; + case "false": + echo " \n"; + echo " \n"; + + break; + default: + echo " \n"; + echo " \n"; + } + echo " \n"; + ?> +
Description -- cgit v1.2.3