mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 08:02:23 +02:00
move external_exec to common
git-svn-id: http://www.observium.org/svn/observer/trunk@2549 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -2,6 +2,17 @@
|
|||||||
|
|
||||||
## Common Functions
|
## Common Functions
|
||||||
|
|
||||||
|
function external_exec($command)
|
||||||
|
{
|
||||||
|
global $debug;
|
||||||
|
|
||||||
|
if ($debug) { echo($command."\n"); }
|
||||||
|
$output = shell_exec($command);
|
||||||
|
if ($debug) { echo($output."\n"); }
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
function shorthost($hostname, $len=12)
|
function shorthost($hostname, $len=12)
|
||||||
{
|
{
|
||||||
$parts = explode(".", $hostname);
|
$parts = explode(".", $hostname);
|
||||||
|
|||||||
@@ -18,18 +18,6 @@ include_once($config['install_dir'] . "/includes/services.inc.php");
|
|||||||
include_once($config['install_dir'] . "/includes/dbFacile.php");
|
include_once($config['install_dir'] . "/includes/dbFacile.php");
|
||||||
include_once($config['install_dir'] . "/includes/console_colour.php");
|
include_once($config['install_dir'] . "/includes/console_colour.php");
|
||||||
|
|
||||||
function external_exec($command)
|
|
||||||
{
|
|
||||||
global $debug;
|
|
||||||
|
|
||||||
if ($debug) { echo($command."\n"); }
|
|
||||||
$output = shell_exec($command);
|
|
||||||
if ($debug) { echo($output."\n"); }
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function mac_clean_to_readable($mac)
|
function mac_clean_to_readable($mac)
|
||||||
{
|
{
|
||||||
$r = substr($mac, 0, 2);
|
$r = substr($mac, 0, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user