mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
Initial Import
git-svn-id: http://www.observium.org/svn/observer/trunk@2 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/php
|
||||
<?
|
||||
include("config.php");
|
||||
include("includes/functions.php");
|
||||
|
||||
# Remove a host and all related data from the system
|
||||
|
||||
if($argv[1]) {
|
||||
$host = strtolower($argv[1]);
|
||||
$id = getidbyname($host);
|
||||
mysql_query("DELETE FROM `devices` WHERE `id` = '$id'");
|
||||
mysql_query("DELETE FROM `interfaces` WHERE `host` = '$id'");
|
||||
`rm -f rrd/$host-*.rrd`;
|
||||
`./cleanup.php`;
|
||||
echo("Removed $host");
|
||||
} else {
|
||||
echo("Need host to remove!\n\n");
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user