diff options
author | dodoradio <dodoradio@github.com> | 2022-10-02 02:15:30 +0100 |
---|---|---|
committer | Arseniy-Movshev <dodoradio@outlook.com> | 2022-11-05 20:03:44 +0000 |
commit | 287b52dd0e339574e11b05a5f6cbcf99e4d1dc93 (patch) | |
tree | c38655e45d3b09e11b4304e0573bfa163377956e /healthd.cpp |
Initial commit
Diffstat (limited to 'healthd.cpp')
-rw-r--r-- | healthd.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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 <QCoreApplication> +#include <QDBusConnection> +#include <QDebug> +#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; +} |