aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/phpservice/phpservice.inc11
-rw-r--r--config/phpservice/phpservice_php_edit.tmp13
-rw-r--r--pkg_config.7.xml2
3 files changed, 18 insertions, 8 deletions
diff --git a/config/phpservice/phpservice.inc b/config/phpservice/phpservice.inc
index 041dfafc..421ac94d 100644
--- a/config/phpservice/phpservice.inc
+++ b/config/phpservice/phpservice.inc
@@ -63,10 +63,9 @@ function phpservice_sync_package_php()
global $config;
if($config['installedpackages']['phpservice']['config'] != "") {
-
- conf_mount_rw();
- config_unlock();
+ conf_mount_rw();
+ config_unlock();
$tmp = "<?php\n";
$tmp .= "\n";
@@ -186,13 +185,11 @@ function php_install_command()
exec("cp /tmp/phpservice_php_edit.tmp /usr/local/www/packages/phpservice/phpservice_php_edit.php");
unlink_if_exists("/tmp/phpservice_php_edit.tmp");
-
- //write_config();
-
+ //write_config();
write_rcfile(array(
"file" => "phpservice.sh",
- "start" => "/usr/local/bin/php /usr/local/pkg/phpservice.php",
+ "start" => "/usr/local/bin/php /usr/local/pkg/phpservice.php >> /var/log/phpservice.log &",
"stop" => "rm /tmp/phpmonitor.pid"
)
);
diff --git a/config/phpservice/phpservice_php_edit.tmp b/config/phpservice/phpservice_php_edit.tmp
index 070c87d1..2f0a64af 100644
--- a/config/phpservice/phpservice_php_edit.tmp
+++ b/config/phpservice/phpservice_php_edit.tmp
@@ -48,11 +48,24 @@ if (isset($id) && $a_phpservice[$id]) {
}
+
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
+ if ($_GET['act'] == "del") {
+ if ($_GET['type'] == 'php') {
+ if ($a_phpservice[$_GET['id']]) {
+ unset($a_phpservice[$_GET['id']]);
+ write_config();
+ php_sync_package();
+ header("Location: phpservice_php.php");
+ exit;
+ }
+ }
+ }
+
if (!$input_errors) {
$ent = array();
diff --git a/pkg_config.7.xml b/pkg_config.7.xml
index 8f92e45d..3c470d8f 100644
--- a/pkg_config.7.xml
+++ b/pkg_config.7.xml
@@ -134,7 +134,7 @@
<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.3</version>
+ <version>0.4</version>
<status>Beta</status>
<required_version>1.2.1</required_version>
<maintainer>markjcrane@gmail.com</maintainer>