From 287b52dd0e339574e11b05a5f6cbcf99e4d1dc93 Mon Sep 17 00:00:00 2001 From: dodoradio Date: Sun, 2 Oct 2022 02:15:30 +0100 Subject: Initial commit --- healthd.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 healthd.cpp (limited to 'healthd.cpp') diff --git a/healthd.cpp b/healthd.cpp new file mode 100644 index 0000000..c7a0e85 --- /dev/null +++ b/healthd.cpp @@ -0,0 +1,24 @@ +#include +#include +#include +#include "sensors.h" + +int main(int argc, char **argv) +{ + QCoreApplication qcoreapp(argc, argv); + if (!QDBusConnection::systemBus().isConnected()) { + fprintf(stderr, "Cannot connect to the D-Bus system bus.\n"); + return 3; + } + if (!QDBusConnection::sessionBus().isConnected()) { + fprintf(stderr, "Cannot connect to the D-Bus session bus.\n"); + return 2; + } + Logger sensorsLogger; + QCoreApplication::setOrganizationName("asteroid"); + QCoreApplication::setOrganizationDomain("asteroidos.org"); + QCoreApplication::setApplicationName("healthd"); + qDebug() << "healthd started"; + qcoreapp.exec(); + return 0; +} -- cgit v1.2.3-54-g00ecf