Browse Source

Move init-related stuff to its own folder

tags/1.2
Timo Röhling 10 years ago
parent
commit
6aa118f5a7

+ 6
- 6
CMakeLists.txt View File

61
 string(REGEX REPLACE "^/+" "" APPARMOR_PROFILE "${APPARMOR_PROFILE}")
61
 string(REGEX REPLACE "^/+" "" APPARMOR_PROFILE "${APPARMOR_PROFILE}")
62
 string(REPLACE "/" "." APPARMOR_PROFILE "${APPARMOR_PROFILE}")
62
 string(REPLACE "/" "." APPARMOR_PROFILE "${APPARMOR_PROFILE}")
63
 
63
 
64
-configure_file(${PROJECT_NAME}.lsb_init.in ${PROJECT_NAME}.lsb_init @ONLY)
65
-configure_file(${PROJECT_NAME}.rh_init.in ${PROJECT_NAME}.rh_init @ONLY)
66
-configure_file(${PROJECT_NAME}.upstart.in ${PROJECT_NAME}.upstart @ONLY)
67
-configure_file(${PROJECT_NAME}.apparmor.in ${PROJECT_NAME}.apparmor @ONLY)
68
-configure_file(${PROJECT_NAME}.service.in ${PROJECT_NAME}.service @ONLY)
69
-configure_file(${PROJECT_NAME}.default.in ${PROJECT_NAME}.default @ONLY)
64
+configure_file(init/${PROJECT_NAME}.sysv-lsb.in ${PROJECT_NAME}.sysv-lsb @ONLY)
65
+configure_file(init/${PROJECT_NAME}.sysv-redhat.in ${PROJECT_NAME}.sysv-redhat @ONLY)
66
+configure_file(init/${PROJECT_NAME}.upstart.in ${PROJECT_NAME}.upstart @ONLY)
67
+configure_file(init/${PROJECT_NAME}.apparmor.in ${PROJECT_NAME}.apparmor @ONLY)
68
+configure_file(init/${PROJECT_NAME}.systemd.in ${PROJECT_NAME}.systemd @ONLY)
69
+configure_file(init/${PROJECT_NAME}.default.in ${PROJECT_NAME}.default @ONLY)
70
 
70
 
71
 configure_file(postinstall.cmake.in postinstall.cmake @ONLY)
71
 configure_file(postinstall.cmake.in postinstall.cmake @ONLY)
72
 
72
 

postsrsd.apparmor.in → init/postsrsd.apparmor.in View File


postsrsd.default.in → init/postsrsd.default.in View File

1
 # Default settings for postsrsd
1
 # Default settings for postsrsd
2
 
2
 
3
-# Local domain name. 
4
-# Addresses are rewritten to originate from this domain. The default value 
3
+# Local domain name.
4
+# Addresses are rewritten to originate from this domain. The default value
5
 # is taken from `postconf -h mydomain` and probably okay.
5
 # is taken from `postconf -h mydomain` and probably okay.
6
 #
6
 #
7
 #SRS_DOMAIN=example.com
7
 #SRS_DOMAIN=example.com
17
 # When postsrsd is installed for the first time, a random secret is generated
17
 # When postsrsd is installed for the first time, a random secret is generated
18
 # and stored in /etc/postsrsd.secret. For most installations, that's just fine.
18
 # and stored in /etc/postsrsd.secret. For most installations, that's just fine.
19
 #
19
 #
20
-SRS_SECRET=@SYSCONF_DIR@/@PROJECT_NAME@.secret
20
+#SRS_SECRET=@SYSCONF_DIR@/@PROJECT_NAME@.secret
21
 
21
 
22
 # Local ports for TCP list.
22
 # Local ports for TCP list.
23
 # These ports are used to bind the TCP list for postfix. If you change
23
 # These ports are used to bind the TCP list for postfix. If you change
28
 #SRS_FORWARD_PORT=10001
28
 #SRS_FORWARD_PORT=10001
29
 #SRS_REVERSE_PORT=10002
29
 #SRS_REVERSE_PORT=10002
30
 
30
 
31
-# Drop root privileges and run as another user after initialization. 
31
+# Drop root privileges and run as another user after initialization.
32
 # This is highly recommended as postsrsd handles untrusted input.
32
 # This is highly recommended as postsrsd handles untrusted input.
33
 #
33
 #
34
-RUN_AS=nobody
34
+#RUN_AS=nobody
35
 
35
 

postsrsd.service.in → init/postsrsd.systemd.in View File


postsrsd.lsb_init.in → init/postsrsd.sysv-lsb.in View File


postsrsd.rh_init.in → init/postsrsd.sysv-redhat.in View File


postsrsd.upstart.in → init/postsrsd.upstart.in View File


+ 4
- 3
postinstall.cmake.in View File

19
 endif()
19
 endif()
20
 
20
 
21
 if(INIT_FLAVOR STREQUAL "sysv-lsb")
21
 if(INIT_FLAVOR STREQUAL "sysv-lsb")
22
-	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.lsb_init" TYPE PROGRAM DESTINATION "${SYSCONF_DIR}/init.d" RENAME "@PROJECT_NAME@")
22
+	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.sysv-lsb" TYPE PROGRAM DESTINATION "${SYSCONF_DIR}/init.d" RENAME "@PROJECT_NAME@")
23
 	if(INSSERV)
23
 	if(INSSERV)
24
 		execute_process(
24
 		execute_process(
25
 			COMMAND ${INSSERV} -p "$ENV{DESTDIR}${SYSCONF_DIR}/init.d" @PROJECT_NAME@
25
 			COMMAND ${INSSERV} -p "$ENV{DESTDIR}${SYSCONF_DIR}/init.d" @PROJECT_NAME@
26
 		)
26
 		)
27
 	endif()
27
 	endif()
28
 elseif(INIT_FLAVOR STREQUAL "sysv-redhat")
28
 elseif(INIT_FLAVOR STREQUAL "sysv-redhat")
29
-	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.rh_init" TYPE PROGRAM DESTINATION "${SYSCONF_DIR}/init.d" RENAME "@PROJECT_NAME@")
29
+	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.sysv-redhat" TYPE PROGRAM DESTINATION "${SYSCONF_DIR}/init.d" RENAME "@PROJECT_NAME@")
30
 	if(CHKCONFIG AND NOT "$ENV{DESTDIR}")
30
 	if(CHKCONFIG AND NOT "$ENV{DESTDIR}")
31
 		execute_process(
31
 		execute_process(
32
 			COMMAND ${CHKCONFIG} --add @PROJECT_NAME@
32
 			COMMAND ${CHKCONFIG} --add @PROJECT_NAME@
35
 elseif(INIT_FLAVOR STREQUAL "upstart")
35
 elseif(INIT_FLAVOR STREQUAL "upstart")
36
 	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.upstart" DESTINATION "${SYSCONF_DIR}/init" RENAME "@PROJECT_NAME@.conf")
36
 	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.upstart" DESTINATION "${SYSCONF_DIR}/init" RENAME "@PROJECT_NAME@.conf")
37
 elseif(INIT_FLAVOR STREQUAL "systemd")
37
 elseif(INIT_FLAVOR STREQUAL "systemd")
38
-	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.service" DESTINATION "${SYSCONF_DIR}/systemd/system" RENAME "@PROJECT_NAME@.service")
38
+	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.systemd" DESTINATION "${SYSCONF_DIR}/systemd/system" RENAME "@PROJECT_NAME@.service")
39
 endif()
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 AND EXISTS "/dev/urandom" AND NOT EXISTS "$ENV{DESTDIR}${SYSCONF_DIR}/${SECRET_FILE}")
50
 file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}" DESTINATION "${SYSCONF_DIR}" RENAME "${SECRET_FILE}" PERMISSIONS OWNER_READ OWNER_WRITE)
50
 file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}" DESTINATION "${SYSCONF_DIR}" RENAME "${SECRET_FILE}" PERMISSIONS OWNER_READ OWNER_WRITE)
51
 file(REMOVE "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}")
51
 file(REMOVE "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}")
52
 endif()
52
 endif()
53
+

Loading…
Cancel
Save