mirror of https://gitee.com/bigwinds/arangodb
Fix logrotate configuration (#4212)
This commit is contained in:
parent
b3556f7b17
commit
5b58156309
|
@ -3,8 +3,8 @@
|
||||||
weekly
|
weekly
|
||||||
compress
|
compress
|
||||||
delaycompress
|
delaycompress
|
||||||
create 640 arangodb adm
|
create 640 arangodb @LOGROTATE_GROUP@
|
||||||
postrotate
|
postrotate
|
||||||
systemctl -q is-active @SERVICE_NAME@ && systemctl kill --signal=SIGHUP arangodb3
|
systemctl -q is-active @SERVICE_NAME@ && systemctl kill --signal=SIGHUP @SERVICE_NAME@
|
||||||
endscript
|
endscript
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,27 +178,8 @@ if (UNIX)
|
||||||
DESTINATION ${SYSTEMD_UNIT_DIR}/
|
DESTINATION ${SYSTEMD_UNIT_DIR}/
|
||||||
RENAME ${SERVICE_NAME}.service
|
RENAME ${SERVICE_NAME}.service
|
||||||
)
|
)
|
||||||
|
|
||||||
# configure and install logrotate file
|
|
||||||
configure_file (
|
|
||||||
${ARANGODB_SOURCE_DIR}/Installation/logrotate.d/arangod.systemd
|
|
||||||
${PROJECT_BINARY_DIR}/arangod.systemd
|
|
||||||
NEWLINE_STYLE UNIX
|
|
||||||
)
|
|
||||||
install(
|
|
||||||
FILES ${PROJECT_BINARY_DIR}/arangod.systemd
|
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
||||||
DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/logrotate.d
|
|
||||||
RENAME ${SERVICE_NAME}
|
|
||||||
)
|
|
||||||
|
|
||||||
else ()
|
else ()
|
||||||
message(STATUS "-- systemd not found")
|
message(STATUS "-- systemd not found")
|
||||||
configure_file (
|
|
||||||
${ARANGODB_SOURCE_DIR}/Installation/logrotate.d/arangod.sysv
|
|
||||||
${PROJECT_BINARY_DIR}/arangod.sysv
|
|
||||||
NEWLINE_STYLE UNIX
|
|
||||||
)
|
|
||||||
endif(SYSTEMD_FOUND)
|
endif(SYSTEMD_FOUND)
|
||||||
endif(NOT PKG_CONFIG_FOUND)
|
endif(NOT PKG_CONFIG_FOUND)
|
||||||
endif(UNIX)
|
endif(UNIX)
|
||||||
|
|
|
@ -24,6 +24,8 @@ else()
|
||||||
set(CPACK_SYSTEMD_FOUND "0")
|
set(CPACK_SYSTEMD_FOUND "0")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(LOGROTATE_GROUP "adm")
|
||||||
|
|
||||||
# substitute the package name so debconf works:
|
# substitute the package name so debconf works:
|
||||||
configure_file (
|
configure_file (
|
||||||
"${PROJECT_SOURCE_DIR}/Installation/debian/templates.in"
|
"${PROJECT_SOURCE_DIR}/Installation/debian/templates.in"
|
||||||
|
|
|
@ -28,6 +28,7 @@ endif ()
|
||||||
set(ARANGODB_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
|
set(ARANGODB_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
|
||||||
# eventually the package string will be modified later on:
|
# eventually the package string will be modified later on:
|
||||||
|
|
||||||
|
set(LOGROTATE_GROUP "arangodb")
|
||||||
if ("${PACKAGING}" STREQUAL "DEB")
|
if ("${PACKAGING}" STREQUAL "DEB")
|
||||||
if(CMAKE_TARGET_ARCHITECTURES MATCHES ".*x86_64.*")
|
if(CMAKE_TARGET_ARCHITECTURES MATCHES ".*x86_64.*")
|
||||||
set(ARANGODB_PACKAGE_ARCHITECTURE "amd64")
|
set(ARANGODB_PACKAGE_ARCHITECTURE "amd64")
|
||||||
|
@ -77,6 +78,29 @@ else ()
|
||||||
include(packages/tar)
|
include(packages/tar)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (UNIX)
|
||||||
|
if (SYSTEMD_FOUND)
|
||||||
|
# configure and install logrotate file
|
||||||
|
configure_file (
|
||||||
|
${ARANGODB_SOURCE_DIR}/Installation/logrotate.d/arangod.systemd
|
||||||
|
${PROJECT_BINARY_DIR}/arangod.systemd
|
||||||
|
NEWLINE_STYLE UNIX
|
||||||
|
)
|
||||||
|
install(
|
||||||
|
FILES ${PROJECT_BINARY_DIR}/arangod.systemd
|
||||||
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||||
|
DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/logrotate.d
|
||||||
|
RENAME ${SERVICE_NAME}
|
||||||
|
)
|
||||||
|
else ()
|
||||||
|
configure_file (
|
||||||
|
${ARANGODB_SOURCE_DIR}/Installation/logrotate.d/arangod.sysv
|
||||||
|
${PROJECT_BINARY_DIR}/arangod.sysv
|
||||||
|
NEWLINE_STYLE UNIX
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
"${CMAKE_SOURCE_DIR}/Installation/cmake/CMakeCPackOptions.cmake.in"
|
"${CMAKE_SOURCE_DIR}/Installation/cmake/CMakeCPackOptions.cmake.in"
|
||||||
|
|
Loading…
Reference in New Issue