File tree Expand file tree Collapse file tree 4 files changed +28
-21
lines changed Expand file tree Collapse file tree 4 files changed +28
-21
lines changed Original file line number Diff line number Diff line change 3
3
weekly
4
4
compress
5
5
delaycompress
6
- create 640 arangodb adm
6
+ create 640 arangodb @LOGROTATE_GROUP@
7
7
postrotate
8
- systemctl -q is-active @SERVICE_NAME@ && systemctl kill --signal=SIGHUP arangodb3
8
+ systemctl -q is-active @SERVICE_NAME@ && systemctl kill --signal=SIGHUP @SERVICE_NAME@
9
9
endscript
10
10
}
Original file line number Diff line number Diff line change @@ -178,27 +178,8 @@ if (UNIX)
178
178
DESTINATION ${SYSTEMD_UNIT_DIR} /
179
179
RENAME ${SERVICE_NAME} .service
180
180
)
181
-
182
- # configure and install logrotate file
183
- configure_file (
184
- ${ARANGODB_SOURCE_DIR} /Installation/logrotate.d/arangod.systemd
185
- ${PROJECT_BINARY_DIR} /arangod.systemd
186
- NEWLINE_STYLE UNIX
187
- )
188
- install (
189
- FILES ${PROJECT_BINARY_DIR} /arangod.systemd
190
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
191
- DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR} /logrotate.d
192
- RENAME ${SERVICE_NAME}
193
- )
194
-
195
181
else ()
196
182
message (STATUS "-- systemd not found" )
197
- configure_file (
198
- ${ARANGODB_SOURCE_DIR} /Installation/logrotate.d/arangod.sysv
199
- ${PROJECT_BINARY_DIR} /arangod.sysv
200
- NEWLINE_STYLE UNIX
201
- )
202
183
endif (SYSTEMD_FOUND )
203
184
endif (NOT PKG_CONFIG_FOUND )
204
185
endif (UNIX )
Original file line number Diff line number Diff line change 24
24
set (CPACK_SYSTEMD_FOUND "0" )
25
25
endif ()
26
26
27
+ set (LOGROTATE_GROUP "adm" )
28
+
27
29
# substitute the package name so debconf works:
28
30
configure_file (
29
31
"${PROJECT_SOURCE_DIR} /Installation/debian/templates.in"
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ endif ()
28
28
set (ARANGODB_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR} )
29
29
# eventually the package string will be modified later on:
30
30
31
+ set (LOGROTATE_GROUP "arangodb" )
31
32
if ("${PACKAGING} " STREQUAL "DEB" )
32
33
if (CMAKE_TARGET_ARCHITECTURES MATCHES ".*x86_64.*" )
33
34
set (ARANGODB_PACKAGE_ARCHITECTURE "amd64" )
@@ -77,6 +78,29 @@ else ()
77
78
include (packages/tar )
78
79
endif ()
79
80
81
+ if (UNIX )
82
+ if (SYSTEMD_FOUND )
83
+ # configure and install logrotate file
84
+ configure_file (
85
+ ${ARANGODB_SOURCE_DIR} /Installation/logrotate.d/arangod.systemd
86
+ ${PROJECT_BINARY_DIR} /arangod.systemd
87
+ NEWLINE_STYLE UNIX
88
+ )
89
+ install (
90
+ FILES ${PROJECT_BINARY_DIR} /arangod.systemd
91
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
92
+ DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR} /logrotate.d
93
+ RENAME ${SERVICE_NAME}
94
+ )
95
+ else ()
96
+ configure_file (
97
+ ${ARANGODB_SOURCE_DIR} /Installation/logrotate.d/arangod.sysv
98
+ ${PROJECT_BINARY_DIR} /arangod.sysv
99
+ NEWLINE_STYLE UNIX
100
+ )
101
+ endif ()
102
+ endif ()
103
+
80
104
81
105
configure_file (
82
106
"${CMAKE_SOURCE_DIR} /Installation/cmake/CM
378D
akeCPackOptions.cmake.in"
You can’t perform that action at this time.
0 commit comments