forked from quiet2/network-weathermap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
weathermap-cacti-rebuild.php
32 lines (25 loc) · 1.15 KB
/
weathermap-cacti-rebuild.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
#
# Change the uncommented line to point to your Cacti installation
#
# $cacti_base = "C:/Program Files/xampp/htdocs/cacti/";
// $cacti_base = "/var/www/html/cacti/";
// $cacti_base = "/Applications/XAMPP/htdocs/cacti/";
// $cacti_base = "/XAMPP/htdocs/cacti-0.8.7e/";
$cacti_base = dirname(__FILE__) . "/../../";
$no_http_headers = true;
// check if the goalposts have moved
if (is_dir($cacti_base) && file_exists($cacti_base . "include/global.php")) {
// include the cacti-config, so we know about the database
require_once $cacti_base . "include/global.php";
} elseif (is_dir($cacti_base) && file_exists($cacti_base . "include/config.php")) {
// include the cacti-config, so we know about the database
require_once $cacti_base . "include/config.php";
} else {
print "Couldn't find a usable Cacti config";
}
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "setup.php";
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib" . DIRECTORY_SEPARATOR . "Weathermap" . DIRECTORY_SEPARATOR . "Poller" . DIRECTORY_SEPARATOR . "poller-common.php";
weathermap_setup_table();
Weathermap\Poller\runMaps(dirname(__FILE__));
// vim:ts=4:sw=4: