|
@@ -7,8 +7,10 @@ option(USE_APPARMOR "Enable AppArmor profile" OFF)
|
7
|
7
|
|
8
|
8
|
set(CHROOT_DIR "${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}" CACHE PATH "Chroot jail for daemon")
|
9
|
9
|
set(SYSCONF_DIR "/etc" CACHE PATH "Global system configuration folder")
|
|
10
|
+set(SYSD_UNIT_DIR "${SYSCONF_DIR}/systemd/system" CACHE PATH "Systemd unit file folder")
|
10
|
11
|
set(CONFIG_DIR "${SYSCONF_DIR}/default" CACHE PATH "Location of startup configuration file")
|
11
|
12
|
set(DOC_DIR "share/doc/${PROJECT_NAME}" CACHE PATH "Path for documentation files")
|
|
13
|
+mark_as_advanced(CHROOT_DIR SYSCONF_DIR SYSD_UNIT_DIR CONFIG_DIR DOC_DIR)
|
12
|
14
|
|
13
|
15
|
find_program(HELP2MAN help2man DOC "path to help2man executable")
|
14
|
16
|
find_program(DD dd DOC "path to dd executable")
|
|
@@ -45,7 +47,7 @@ if(HAVE_TIME_H)
|
45
|
47
|
endif()
|
46
|
48
|
|
47
|
49
|
if(NOT DEFINED INIT_FLAVOR)
|
48
|
|
- if(IS_DIRECTORY "${SYSCONF_DIR}/systemd" AND EXISTS "/usr/lib/systemd/systemd")
|
|
50
|
+ if(IS_DIRECTORY "${SYSD_UNIT_DIR}" AND EXISTS "/usr/lib/systemd/systemd")
|
49
|
51
|
message(STATUS "Detected init flavor: systemd")
|
50
|
52
|
set(INIT_FLAVOR "systemd" CACHE STRING "Init daemon of this system")
|
51
|
53
|
elseif(IS_DIRECTORY "${SYSCONF_DIR}/init" AND EXISTS "/lib/init/upstart-job")
|