Codebase list centreon-engine / ba2d9d9
Add logrotate configuration files. Dorian Guillois 11 years ago
2 changed file(s) with 54 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
450450 COMPONENT "runtime")
451451 endif ()
452452
453 # logrotate directory.
454 option(WITH_LOGROTATE_SCRIPT "Generate and install logrotate script." OFF)
455 if (WITH_LOGROTATE_SCRIPT)
456 # Generate logrotate file.
457 message(STATUS "Generating logrorate file.")
458 configure_file(
459 "${SCRIPT_DIR}/logrotate.conf.in"
460 "${SCRIPT_DIR}/logrotate.conf"
461 @ONLY)
462
463 # logrotate file install directory.
464 if (WITH_LOGROTATE_DIR)
465 set(LOGROTATE_DIR "${WITH_LOGROTATE_DIR}")
466 else ()
467 set(LOGROTATE_DIR "/etc/logrotate.d")
468 endif ()
469
470 # Install rule.
471 install(
472 FILES "${SCRIPT_DIR}/logrotate.conf"
473 DESTINATION "${LOGROTATE_DIR}"
474 COMPONENT "runtime"
475 RENAME "centengine"
476 )
477 endif ()
478
453479 # var directory.
454480 if (WITH_VAR_DIR)
455481 set(VAR_DIR "${WITH_VAR_DIR}")
11211147 if (WITH_PKGCONFIG_SCRIPT)
11221148 message(STATUS " - pkg-config directory ${PKGCONFIG_DIR}")
11231149 endif ()
1150 if (WITH_LOGROTATE_SCRIPT)
1151 message(STATUS " - logrotate directory ${LOGROTATE_DIR}")
1152 endif ()
11241153 if (STARTUP_DIR)
11251154 message(STATUS " - Startup directory ${STARTUP_DIR}")
11261155 endif ()
0 @VAR_DIR@/centengine.log {
1 compress
2 copytruncate
3 create 640 @USER@ @GROUP@
4 daily
5 delaycompress
6 missingok
7 notifempty
8 olddir @LOG_ARCHIVE_DIR@
9 rotate 30
10 size 100M
11 }
12
13 @VAR_DIR@/centengine.debug {
14 compress
15 copytruncate
16 create 640 @USER@ @GROUP@
17 daily
18 delaycompress
19 missingok
20 notifempty
21 olddir @LOG_ARCHIVE_DIR@
22 rotate 5
23 size 1G
24 }