updated to use function for last commit

This commit is contained in:
laf
2015-08-25 08:40:20 +00:00
parent 59de0d1478
commit 86059f67c1
3 changed files with 6 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ $options = getopt('h:m:i:n:d::a::q');
if (!isset($options['q'])) { if (!isset($options['q'])) {
echo $config['project_name_version']." Discovery\n"; echo $config['project_name_version']." Discovery\n";
echo `git log -n 1|grep 'commit '`."\n"; echo get_last_commit()."\n";
} }
if (isset($options['h'])) { if (isset($options['h'])) {

View File

@@ -1227,3 +1227,7 @@ function fping($host,$params) {
function function_check($function) { function function_check($function) {
return function_exists($function); return function_exists($function);
} }
function get_last_commit() {
return `git log -n 1|head -n1`;
}//end get_last_commit

View File

@@ -23,7 +23,7 @@ require 'includes/alerts.inc.php';
$poller_start = utime(); $poller_start = utime();
echo $config['project_name_version']." Poller\n"; echo $config['project_name_version']." Poller\n";
echo `git log -n 1|grep 'commit '`."\n"; echo get_last_commit()."\n";
$options = getopt('h:m:i:n:r::d::a::'); $options = getopt('h:m:i:n:r::d::a::');