From 4c7ffd6778c902a315167b85d1527d88f17004eb Mon Sep 17 00:00:00 2001 From: mcrane Date: Sat, 21 Feb 2009 14:22:52 -0700 Subject: phpservice save output to a log file /var/log/phpservice.log, backround the service, enable delete for php scripts --- config/phpservice/phpservice.inc | 11 ++++------- config/phpservice/phpservice_php_edit.tmp | 13 +++++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'config/phpservice') 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 = " "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(); -- cgit v1.2.3