mirror of https://github.com/Icinga/icinga2.git
parent
a3c6732adc
commit
3f922e5eac
|
@ -608,7 +608,7 @@ void StatusDataWriter::StatusTimerHandler(void)
|
|||
|
||||
statusfp << "info {" << "\n"
|
||||
<< "\t" << "created=" << Utility::GetTime() << "\n"
|
||||
<< "\t" << "version=2.0" << "\n"
|
||||
<< "\t" << "version=" << Application::GetVersion() << "\n"
|
||||
<< "\t" << "}" << "\n"
|
||||
<< "\n";
|
||||
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
#include <boost/foreach.hpp>
|
||||
|
||||
#ifndef _WIN32
|
||||
# include "icinga-version.h"
|
||||
# define ICINGA_VERSION VERSION ", " GIT_MESSAGE
|
||||
|
||||
# include <ltdl.h>
|
||||
# include <sys/types.h>
|
||||
# include <pwd.h>
|
||||
|
@ -290,9 +287,7 @@ int main(int argc, char **argv)
|
|||
std::cout << appName << " " << "- The Icinga 2 network monitoring daemon.";
|
||||
|
||||
if (g_AppParams.count("version")) {
|
||||
#ifndef _WIN32
|
||||
std::cout << " (Version: " << ICINGA_VERSION << ")";
|
||||
#endif /* _WIN32 */
|
||||
std::cout << " (Version: " << Application::GetVersion() << ")";
|
||||
std::cout << 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
|
||||
|
|
|
@ -705,3 +705,8 @@ ThreadPool& Application::GetTP(void)
|
|||
static ThreadPool tp;
|
||||
return tp;
|
||||
}
|
||||
|
||||
String Application::GetVersion(void)
|
||||
{
|
||||
return ICINGA_VERSION;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "base/i2-base.h"
|
||||
#include "base/threadpool.h"
|
||||
#include "base/dynamicobject.h"
|
||||
#include "icinga-version.h"
|
||||
#define ICINGA_VERSION VERSION ", " GIT_MESSAGE
|
||||
|
||||
namespace icinga {
|
||||
|
||||
|
@ -92,6 +94,8 @@ public:
|
|||
|
||||
static ThreadPool& GetTP(void);
|
||||
|
||||
static String GetVersion(void);
|
||||
|
||||
protected:
|
||||
virtual void OnConfigLoaded(void);
|
||||
virtual void Stop(void);
|
||||
|
|
Loading…
Reference in New Issue