Skip to content

Commit

Permalink
iiod: ensure service starts with only hwmon devs
Browse files Browse the repository at this point in the history
Signed-off-by: Cristina Suteu <[email protected]>
  • Loading branch information
cristina-suteu committed Oct 9, 2024
1 parent 9f24ce5 commit 422a72f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions iiod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ endif()

option(WITH_SYSTEMD "Enable installation of systemd service file for iiod" OFF)
if (WITH_SYSTEMD)
if(${WITH_HWMON})
set(CMAKE_SERVICE_PATH "ConditionPathExists=|/sys/bus/iio\nConditionPathExists=|/sys/class/hwmon")
else()
set(CMAKE_SERVICE_PATH "ConditionPathExists=/sys/bus/iio")
endif()
set(SYSTEMD_UNIT_INSTALL_DIR /lib/systemd/system CACHE PATH
"default install path for systemd unit files"
)
Expand Down
2 changes: 1 addition & 1 deletion iiod/init/iiod.service.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Description=IIO Daemon
Requires=systemd-udev-settle.service
After=network.target systemd-udev-settle.service
ConditionPathExists=/sys/bus/iio
@CMAKE_SERVICE_PATH@
Documentation=man:iiod(8)

[Service]
Expand Down

0 comments on commit 422a72f

Please sign in to comment.