|
@@ -1,3 +1,4 @@
|
|
1
|
+set(GENERATE_SRS_SECRET "@GENERATE_SRS_SECRET@")
|
1
|
2
|
set(INIT_FLAVOR "@INIT_FLAVOR@")
|
2
|
3
|
set(SECRET_FILE "@PROJECT_NAME@.secret")
|
3
|
4
|
set(DD "@DD@")
|
|
@@ -19,7 +20,7 @@ elseif(INIT_FLAVOR STREQUAL "upstart")
|
19
|
20
|
file(INSTALL "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.upstart" DESTINATION "/etc/init" RENAME "@PROJECT_NAME@.conf")
|
20
|
21
|
endif()
|
21
|
22
|
|
22
|
|
-if(DD AND BASE64 AND EXISTS "/dev/urandom" AND NOT EXISTS "$ENV{DESTDIR}/etc/${SECRET_FILE}")
|
|
23
|
+if(GENERATE_SRS_SECRET AND DD AND BASE64 AND EXISTS "/dev/urandom" AND NOT EXISTS "$ENV{DESTDIR}/etc/${SECRET_FILE}")
|
23
|
24
|
message(STATUS "Generating secret key")
|
24
|
25
|
execute_process(
|
25
|
26
|
COMMAND ${DD} if=/dev/urandom bs=18 count=1
|