|
@@ -5,7 +5,7 @@ set(CONFIG_DIR "@CONFIG_DIR@")
|
5
|
5
|
set(INIT_FLAVOR "@INIT_FLAVOR@")
|
6
|
6
|
set(SECRET_FILE "@PROJECT_NAME@.secret")
|
7
|
7
|
set(DD "@DD@")
|
8
|
|
-set(BASE64 "@BASE64@")
|
|
8
|
+set(BASE64_ENCODE "@BASE64_ENCODE@")
|
9
|
9
|
set(INSSERV "@INSSERV@")
|
10
|
10
|
set(CHKCONFIG "@CHKCONFIG@")
|
11
|
11
|
|
|
@@ -38,11 +38,11 @@ elseif(INIT_FLAVOR STREQUAL "systemd")
|
38
|
38
|
file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.systemd" DESTINATION "${SYSCONF_DIR}/systemd/system" RENAME "@PROJECT_NAME@.service")
|
39
|
39
|
endif()
|
40
|
40
|
|
41
|
|
-if(GENERATE_SRS_SECRET AND DD AND BASE64 AND EXISTS "/dev/urandom" AND NOT EXISTS "$ENV{DESTDIR}${SYSCONF_DIR}/${SECRET_FILE}")
|
|
41
|
+if(GENERATE_SRS_SECRET AND DD AND BASE64_ENCODE AND EXISTS "/dev/urandom" AND NOT EXISTS "$ENV{DESTDIR}${SYSCONF_DIR}/${SECRET_FILE}")
|
42
|
42
|
message(STATUS "Generating secret key")
|
43
|
43
|
execute_process(
|
44
|
44
|
COMMAND ${DD} if=/dev/urandom bs=18 count=1
|
45
|
|
- COMMAND ${BASE64}
|
|
45
|
+ COMMAND ${BASE64_ENCODE}
|
46
|
46
|
OUTPUT_FILE "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}"
|
47
|
47
|
ERROR_QUIET
|
48
|
48
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|