mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
parent
a3c6732adc
commit
3f922e5eac
@ -608,7 +608,7 @@ void StatusDataWriter::StatusTimerHandler(void)
|
|||||||
|
|
||||||
statusfp << "info {" << "\n"
|
statusfp << "info {" << "\n"
|
||||||
<< "\t" << "created=" << Utility::GetTime() << "\n"
|
<< "\t" << "created=" << Utility::GetTime() << "\n"
|
||||||
<< "\t" << "version=2.0" << "\n"
|
<< "\t" << "version=" << Application::GetVersion() << "\n"
|
||||||
<< "\t" << "}" << "\n"
|
<< "\t" << "}" << "\n"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
|
|
||||||
|
@ -32,9 +32,6 @@
|
|||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
# include "icinga-version.h"
|
|
||||||
# define ICINGA_VERSION VERSION ", " GIT_MESSAGE
|
|
||||||
|
|
||||||
# include <ltdl.h>
|
# include <ltdl.h>
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <pwd.h>
|
# include <pwd.h>
|
||||||
@ -290,9 +287,7 @@ int main(int argc, char **argv)
|
|||||||
std::cout << appName << " " << "- The Icinga 2 network monitoring daemon.";
|
std::cout << appName << " " << "- The Icinga 2 network monitoring daemon.";
|
||||||
|
|
||||||
if (g_AppParams.count("version")) {
|
if (g_AppParams.count("version")) {
|
||||||
#ifndef _WIN32
|
std::cout << " (Version: " << Application::GetVersion() << ")";
|
||||||
std::cout << " (Version: " << ICINGA_VERSION << ")";
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
std::cout << std::endl
|
std::cout << std::endl
|
||||||
<< "Copyright (c) 2012-2013 Icinga Development Team (http://www.icinga.org)" << std::endl
|
<< "Copyright (c) 2012-2013 Icinga Development Team (http://www.icinga.org)" << std::endl
|
||||||
<< "License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>" << std::endl
|
<< "License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>" << std::endl
|
||||||
|
@ -705,3 +705,8 @@ ThreadPool& Application::GetTP(void)
|
|||||||
static ThreadPool tp;
|
static ThreadPool tp;
|
||||||
return tp;
|
return tp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String Application::GetVersion(void)
|
||||||
|
{
|
||||||
|
return ICINGA_VERSION;
|
||||||
|
}
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#include "base/i2-base.h"
|
#include "base/i2-base.h"
|
||||||
#include "base/threadpool.h"
|
#include "base/threadpool.h"
|
||||||
#include "base/dynamicobject.h"
|
#include "base/dynamicobject.h"
|
||||||
|
#include "icinga-version.h"
|
||||||
|
#define ICINGA_VERSION VERSION ", " GIT_MESSAGE
|
||||||
|
|
||||||
namespace icinga {
|
namespace icinga {
|
||||||
|
|
||||||
@ -92,6 +94,8 @@ public:
|
|||||||
|
|
||||||
static ThreadPool& GetTP(void);
|
static ThreadPool& GetTP(void);
|
||||||
|
|
||||||
|
static String GetVersion(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnConfigLoaded(void);
|
virtual void OnConfigLoaded(void);
|
||||||
virtual void Stop(void);
|
virtual void Stop(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user