Some last minute changes

This commit is contained in:
laf
2015-04-06 20:47:28 +01:00
parent 1d608dbdb6
commit 7a302c2763
4 changed files with 10 additions and 8 deletions
+2 -8
View File
@@ -12,12 +12,6 @@
* the source code distribution for details.
*/
include_once("includes/defaults.inc.php");
include_once("config.php");
include_once($config['install_dir']."/includes/definitions.inc.php");
include_once($config['install_dir']."/includes/functions.php");
include_once($config['install_dir']."/includes/alerts.inc.php");
$enabled = dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'enabled'");
if ($enabled == 1) {
@@ -84,7 +78,7 @@ if ($enabled == 1) {
rtrim($fields, '&');
$post = curl_init();
curl_setopt($post, CURLOPT_URL, 'http://lathwood.co.uk/log/log.php');
curl_setopt($post, CURLOPT_URL, $config['callback_post']);
curl_setopt($post, CURLOPT_POST, count($submit));
curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
@@ -95,7 +89,7 @@ if ($enabled == 1) {
$fields = "uuid=$uuid";
$clear = curl_init();
curl_setopt($clear, CURLOPT_URL, 'http://lathwood.co.uk/log/clear.php');
curl_setopt($clear, CURLOPT_URL, $config['callback_clear']);
curl_setopt($clear, CURLOPT_POST, count($clear));
curl_setopt($clear, CURLOPT_POSTFIELDS, $fields);
curl_setopt($clear, CURLOPT_RETURNTRANSFER, 1);
+3
View File
@@ -55,5 +55,8 @@ if ($options['f'] === 'perf_times') {
}
}
}
if ($options['f'] === 'callback') {
require_once "callback.php";
}
?>
+1
View File
@@ -11,3 +11,4 @@ php daily.php -f syslog
php daily.php -f eventlog
php daily.php -f authlog
php daily.php -f perf_times
php daily.php -f callback
+4
View File
@@ -599,4 +599,8 @@ $config['distributed_poller_group'] = 0;
$config['distributed_poller_memcached_host'] = 'example.net';
$config['distributed_poller_memcached_port'] = '11211';
// Stats callback system
$config['callback_post'] = 'http://lathwood.co.uk/log/log.php';
$config['callback_clear'] = 'http://lathwood.co.uk/log/clear.php';
?>