2021-04-14 17:33:18 +00:00
|
|
|
find_package(PkgConfig QUIET REQUIRED)
|
|
|
|
pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR "systemd" "systemd_system_unit_dir")
|
|
|
|
if(NOT SYSTEMD_SYSTEM_UNIT_DIR)
|
|
|
|
pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR "systemd" "systemdsystemunitdir")
|
|
|
|
if(NOT SYSTEMD_SYSTEM_UNIT_DIR)
|
|
|
|
set(SYSTEMD_SYSTEM_UNIT_DIR "${CMAKE_INSTALL_LIBDIR}/systemd/system")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
set(SYSTEMD_SYSTEM_UNIT_DIR "${SYSTEMD_SYSTEM_UNIT_DIR}"
|
|
|
|
CACHE PATH "Location for systemd system unit files")
|
|
|
|
|
2018-02-28 06:49:43 +00:00
|
|
|
set(CEPH_SYSTEMD_ENV_DIR "/etc/sysconfig"
|
2018-02-27 08:42:48 +00:00
|
|
|
CACHE PATH "Location for systemd service environmental variable settings files")
|
|
|
|
set(SYSTEMD_ENV_FILE "${CEPH_SYSTEMD_ENV_DIR}/ceph")
|
|
|
|
foreach(service
|
2018-07-24 05:05:01 +00:00
|
|
|
ceph-crash
|
2018-02-27 08:42:48 +00:00
|
|
|
ceph-fuse@
|
|
|
|
ceph-mds@
|
|
|
|
ceph-mgr@
|
|
|
|
ceph-mon@
|
|
|
|
ceph-osd@
|
|
|
|
ceph-radosgw@
|
|
|
|
ceph-rbd-mirror@
|
2018-12-29 08:50:44 +00:00
|
|
|
ceph-immutable-object-cache@
|
2020-12-11 06:47:48 +00:00
|
|
|
cephfs-mirror@
|
2018-02-27 08:42:48 +00:00
|
|
|
rbdmap)
|
|
|
|
configure_file(
|
|
|
|
${service}.service.in
|
|
|
|
${service}.service
|
|
|
|
@ONLY)
|
|
|
|
install(
|
|
|
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/${service}.service
|
2021-04-14 17:33:18 +00:00
|
|
|
DESTINATION ${SYSTEMD_SYSTEM_UNIT_DIR})
|
2018-02-27 08:42:48 +00:00
|
|
|
endforeach()
|
|
|
|
|
2016-06-30 08:01:08 +00:00
|
|
|
install(FILES
|
|
|
|
ceph.target
|
2016-10-19 00:20:34 +00:00
|
|
|
ceph-fuse.target
|
2016-06-30 08:01:08 +00:00
|
|
|
ceph-osd.target
|
2016-09-07 05:39:58 +00:00
|
|
|
ceph-mgr.target
|
2016-06-30 08:01:08 +00:00
|
|
|
ceph-mon.target
|
|
|
|
ceph-mds.target
|
|
|
|
ceph-radosgw.target
|
|
|
|
ceph-rbd-mirror.target
|
2018-12-29 08:50:44 +00:00
|
|
|
ceph-immutable-object-cache.target
|
2017-07-20 16:26:14 +00:00
|
|
|
ceph-volume@.service
|
2020-12-11 06:47:48 +00:00
|
|
|
cephfs-mirror.target
|
2021-04-14 17:33:18 +00:00
|
|
|
DESTINATION ${SYSTEMD_SYSTEM_UNIT_DIR})
|