statusfp << "info {" << "\n"
<< "\t" << "created=" << Utility::GetTime() << "\n"
- << "\t" << "version=2.0" << "\n"
+ << "\t" << "version=" << Application::GetVersion() << "\n"
<< "\t" << "}" << "\n"
<< "\n";
#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>
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
static ThreadPool tp;
return tp;
}
+
+String Application::GetVersion(void)
+{
+ return ICINGA_VERSION;
+}
#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 {
static ThreadPool& GetTP(void);
+ static String GetVersion(void);
+
protected:
virtual void OnConfigLoaded(void);
virtual void Stop(void);