summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseniy-Movshev <dodoradio@outlook.com>2023-05-26 00:44:39 +0100
committerArseniy-Movshev <dodoradio@outlook.com>2023-05-26 00:53:46 +0100
commitf279ddedcac3e9b77ab742c57a37bbdcbabe7a82 (patch)
treec9db43aa7a1f5aae3986793b9464e34f724e8b42
parentec42177b24b47ba68b3ae49634c942c76a9f92d4 (diff)
Add systemd services and rename executable
-rw-r--r--daemon/CMakeLists.txt9
-rw-r--r--daemon/systemd/asteroid-sensorlogd.service8
2 files changed, 14 insertions, 3 deletions
diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt
index 7d38132..e38052b 100644
--- a/daemon/CMakeLists.txt
+++ b/daemon/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_executable(healthd
+add_executable(sensorlogd
sensorlogd.cpp
logger.cpp
logger.h
@@ -7,6 +7,9 @@ add_executable(healthd
sensorPlugins/heartrateSensor.cpp
sensorPlugins/heartrateSensor.h
)
-set_target_properties(healthd PROPERTIES AUTOMOC ON)
+set_target_properties(sensorlogd PROPERTIES AUTOMOC ON)
#add_compile_definitions(Q_DECLARE_PRIVATE_SUPPORTS_UNIQUE_PTR=${Q_DECLARE_PRIVATE_SUPPORTS_UNIQUE_PTR})
-target_link_libraries(healthd PRIVATE Qt5::Core Qt5::DBus Qt5::Qml Qt5::Positioning Qt5::Sensors)
+target_link_libraries(sensorlogd PRIVATE Qt5::Core Qt5::DBus Qt5::Qml Qt5::Positioning Qt5::Sensors)
+install(TARGETS sensorlogd DESTINATION bin)
+install(FILES systemd/asteroid-sensorlogd.service
+ DESTINATION /usr/lib/systemd/user)
diff --git a/daemon/systemd/asteroid-sensorlogd.service b/daemon/systemd/asteroid-sensorlogd.service
new file mode 100644
index 0000000..56a165b
--- /dev/null
+++ b/daemon/systemd/asteroid-sensorlogd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Sensor logger for AsteroidOS
+
+[Service]
+ExecStart=/usr/bin/sensorlogd
+
+[Install]
+WantedBy=basic.target