Skip to content

Commit

Permalink
Merge pull request #720 from sandy-lcq/master
Browse files Browse the repository at this point in the history
CMakeLists.txt: make DLT_WatchdogSec can be set by user
  • Loading branch information
lti9hc authored Jan 9, 2025
2 parents 91deea1 + bc03f14 commit 7f7cd72
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions systemd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ if(WITH_SYSTEMD)
set(SYSTEMD_CONFIGURATIONS_FILES_DIR ${SYSTEMD_UNITDIR} )

if(WITH_SYSTEMD_WATCHDOG)
set( DLT_WatchdogSec 2 )
if(NOT DEFINED DLT_WatchdogSec)
set(DLT_WatchdogSec 2 CACHE STRING "Watchdog timeout in seconds")
endif()
message( STATUS "The systemd watchdog is enabled - timeout is set to ${DLT_WatchdogSec} seconds")
else(WITH_SYSTEMD_WATCHDOG)
set( DLT_WatchdogSec 0 )
if(NOT DEFINED DLT_WatchdogSec)
set(DLT_WatchdogSec 0 CACHE STRING "Watchdog timeout in seconds")
endif()
message( STATUS "The systemd watchdog is disabled")
endif(WITH_SYSTEMD_WATCHDOG)

Expand Down

0 comments on commit 7f7cd72

Please sign in to comment.