diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-04-19 11:32:23 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-04-19 18:17:43 +0200 |
commit | 3f6dcaacd7abc85ebed40053a3ce73bc7753ddf9 (patch) | |
tree | 381706b4f6e38094c8af1feec58ac2a98bdad95a /conf/CMakeLists.txt | |
parent | 51a86fcd6e4f199009888b5a106bf472f1b7c742 (diff) |
Improve environment setting
Some environment variable were set in the configuration files.
This wasn't a valuable solution. Allowing now system tning to
put environment variables in files of /etc/afm/unit.env.d
is much more flexible.
Change-Id: I1796061c9055a2860f0bbab340aa3a6e7b85dd3d
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'conf/CMakeLists.txt')
-rw-r--r-- | conf/CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/conf/CMakeLists.txt b/conf/CMakeLists.txt index d8611e0..cf3d3ec 100644 --- a/conf/CMakeLists.txt +++ b/conf/CMakeLists.txt @@ -19,6 +19,9 @@ cmake_minimum_required(VERSION 2.8) configure_file(afm-launch.conf.in afm-launch.conf) +configure_file(afm-unit.conf.in afm-unit.conf) +configure_file(afm-system-daemon.service.in afm-system-daemon.service) +configure_file(afm-user-daemon.service.in afm-user-daemon.service) if(NOT USE_SDK) set(SYSCONFDIR_DBUS_SYSTEM ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d CACHE STRING "Path to dbus system configuration files") @@ -27,10 +30,11 @@ if(NOT USE_SDK) set(UNITDIR_USER ${CMAKE_INSTALL_LIBDIR}/systemd/user CACHE STRING "Path to systemd system unit files") install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/afm-system-daemon.conf DESTINATION ${SYSCONFDIR_DBUS_SYSTEM}) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/afm-system-daemon.service DESTINATION ${UNITDIR_SYSTEM}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-system-daemon.service DESTINATION ${UNITDIR_SYSTEM}) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/afm-user-daemon.conf DESTINATION ${SYSCONFDIR_DBUS_USER}) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/afm-user-daemon.service DESTINATION ${UNITDIR_USER}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-user-daemon.service DESTINATION ${UNITDIR_USER}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-launch.conf DESTINATION ${afm_confdir}) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/afm-unit.conf DESTINATION ${afm_confdir}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-unit.conf DESTINATION ${afm_confdir}) + install(DIRECTORY DESTINATION ${afm_confdir}/unit.env.d) endif() |