summaryrefslogtreecommitdiff
path: root/systemd/CMakeLists.txt
diff options
context:
space:
mode:
authorChristian Muck <christian.muck@bmw.de>2012-06-04 09:08:52 +0200
committerChristian Muck <christian.muck@bmw.de>2012-06-13 23:52:51 +0200
commit85f564f2b4c580bc151d05559e6ed0614919da8a (patch)
tree96c41c00f70fb5545862cea3e62b26867117e33b /systemd/CMakeLists.txt
parentde0b686c504886187aa1e8ba4373daeff66283e5 (diff)
downloadDLT-daemon-85f564f2b4c580bc151d05559e6ed0614919da8a.tar.gz
[GDLT-90] Implemented systemd watchdog concept in dlt-system
Signed-off-by: Christian Muck <christian.muck@bmw.de>
Diffstat (limited to 'systemd/CMakeLists.txt')
-rw-r--r--systemd/CMakeLists.txt40
1 files changed, 30 insertions, 10 deletions
diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt
index 7411364..d01c1ef 100644
--- a/systemd/CMakeLists.txt
+++ b/systemd/CMakeLists.txt
@@ -15,26 +15,46 @@
########
if(WITH_SYSTEMD)
+
set(SYSTEMD_CONFIGURATIONS_FILES_DIR "/lib/systemd/system" )
if(WITH_SYSTEMD_WATCHDOG)
set( DLT_WatchdogSec 2 )
- message( STATUS "The systemd watchdog is enabled for DLT daemon - timeout is set to ${DLT_WatchdogSec} seconds")
+ message( STATUS "The systemd watchdog is enabled - timeout is set to ${DLT_WatchdogSec} seconds")
else(WITH_SYSTEMD_WATCHDOG)
set( DLT_WatchdogSec 0 )
- message( STATUS "The systemd watchdog is disabled for DLT daemon")
+ message( STATUS "The systemd watchdog is disabled")
endif(WITH_SYSTEMD_WATCHDOG)
configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt.service)
- install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
message( STATUS "Configured systemd unit file:dlt.service" )
- set( DLT_SYSLOG_APPID "SYS" )
- set( DLT_SYSLOG_CTID "LOG" )
- set( DLT_SYSLOG_PORT 4712 )
- message(STATUS "DLT-syslog configuration: APPID:${DLT_SYSLOG_APPID} CTID:${DLT_SYSLOG_CTID} PORT:${DLT_SYSLOG_PORT}" )
- configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-syslog.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-syslog.service)
- install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-syslog.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
- message( STATUS "Configured systemd unit file:dlt-syslog.service" )
+ configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-system.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-system.service)
+ message( STATUS "Configured systemd unit file:dlt-system.service" )
+
+ configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-receive.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-receive.service)
+ message( STATUS "Configured systemd unit file:dlt-receive.service" )
+
+ configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-example-user.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-example-user.service)
+ message( STATUS "Configured systemd unit file:dlt-example-user.service" )
+
+ set( DLT_ADAPTOR_UDP_APPID "DUDP" )
+ set( DLT_ADAPTOR_UDP_CTID "DCTI" )
+ set( DLT_ADAPTOR_UDP_PORT 4712 )
+ configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-adaptor-udp.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-adaptor-udp.service)
+ message( STATUS "Configured systemd unit file:dlt-adaptor-udp.service" )
+ message(STATUS "DLT adaptor udp configuration: APPID=${DLT_ADAPTOR_UDP_APPID} CTID=${DLT_ADAPTOR_UDP_CTID} PORT=${DLT_ADAPTOR_UDP_PORT}" )
+
+ if(EXISTS ${SYSTEMD_CONFIGURATIONS_FILES_DIR})
+ install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
+ install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-system.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
+ install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-receive.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
+ install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-example-user.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
+ install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-adaptor-udp.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} )
+ message(STATUS "Unit files will be installed to ${SYSTEMD_CONFIGURATIONS_FILES_DIR} after make install" )
+ else(EXISTS ${SYSTEMD_CONFIGURATIONS_FILES_DIR})
+ message(STATUS "Unit files will not be installed to ${SYSTEMD_CONFIGURATIONS_FILES_DIR} after make install")
+ endif(EXISTS ${SYSTEMD_CONFIGURATIONS_FILES_DIR})
+
endif(WITH_SYSTEMD) \ No newline at end of file