|
@@ -34,7 +34,10 @@ if(HAVE_TIME_H)
|
34
|
34
|
endif()
|
35
|
35
|
|
36
|
36
|
if(NOT DEFINED INIT_FLAVOR)
|
37
|
|
- if(IS_DIRECTORY "${SYSCONF_DIR}/init" AND EXISTS "/lib/init/upstart-job")
|
|
37
|
+ if(IS_DIRECTORY "${SYSCONF_DIR}/systemd" AND EXISTS "/usr/lib/systemd/systemd")
|
|
38
|
+ message(STATUS "Detected init flavor: systemd")
|
|
39
|
+ set(INIT_FLAVOR "systemd" CACHE STRING "Init daemon of this system")
|
|
40
|
+ elseif(IS_DIRECTORY "${SYSCONF_DIR}/init" AND EXISTS "/lib/init/upstart-job")
|
38
|
41
|
message(STATUS "Detected init flavor: upstart")
|
39
|
42
|
set(INIT_FLAVOR "upstart" CACHE STRING "Init daemon of this system")
|
40
|
43
|
elseif(IS_DIRECTORY "${SYSCONF_DIR}/init.d" AND EXISTS "${SYSCONF_DIR}/init.d/functions")
|
|
@@ -62,6 +65,7 @@ configure_file(${PROJECT_NAME}.lsb_init.in ${PROJECT_NAME}.lsb_init @ONLY)
|
62
|
65
|
configure_file(${PROJECT_NAME}.rh_init.in ${PROJECT_NAME}.rh_init @ONLY)
|
63
|
66
|
configure_file(${PROJECT_NAME}.upstart.in ${PROJECT_NAME}.upstart @ONLY)
|
64
|
67
|
configure_file(${PROJECT_NAME}.apparmor.in ${PROJECT_NAME}.apparmor @ONLY)
|
|
68
|
+configure_file(${PROJECT_NAME}.service.in ${PROJECT_NAME}.service @ONLY)
|
65
|
69
|
configure_file(postinstall.cmake.in postinstall.cmake @ONLY)
|
66
|
70
|
|
67
|
71
|
if(HELP2MAN)
|