diff options
author | Arseniy-Movshev <dodoradio@outlook.com> | 2023-03-12 14:10:23 +0000 |
---|---|---|
committer | Arseniy-Movshev <dodoradio@outlook.com> | 2023-03-12 14:10:23 +0000 |
commit | bfe0c3f7a03c53cff7a4050a42f14eaa210364f8 (patch) | |
tree | 17e460fe4fe554b851df6c474231f03a2f9e7f39 /sensorlogd.cpp | |
parent | 55339aacf03642657e1f9c7d087f9b9fd319de4a (diff) |
Rename project to sensorlogd
Diffstat (limited to 'sensorlogd.cpp')
-rw-r--r-- | sensorlogd.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sensorlogd.cpp b/sensorlogd.cpp new file mode 100644 index 0000000..884b55c --- /dev/null +++ b/sensorlogd.cpp @@ -0,0 +1,24 @@ +#include <QCoreApplication> +#include <QDBusConnection> +#include <QDebug> +#include "logger.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; +} |