Merge branch '2.3' into develop
This commit is contained in:
@ -235,6 +235,7 @@ install_file(${CMAKE_SOURCE_DIR}/LICENSE-THIRDPARTY.TXT core)
|
|||||||
install_file(etc/lsyncd_example.conf core)
|
install_file(etc/lsyncd_example.conf core)
|
||||||
install_manual(Documentation/maxscale.1 1 core)
|
install_manual(Documentation/maxscale.1 1 core)
|
||||||
install_file(${CMAKE_SOURCE_DIR}/server/maxscale_binlogserver_template.cnf core)
|
install_file(${CMAKE_SOURCE_DIR}/server/maxscale_binlogserver_template.cnf core)
|
||||||
|
install_file(${CMAKE_SOURCE_DIR}/etc/logrotate.d/maxscale_logrotate core)
|
||||||
|
|
||||||
# For devel package, these files are put to the base folder
|
# For devel package, these files are put to the base folder
|
||||||
install_header(${CMAKE_SOURCE_DIR}/COPYRIGHT devel)
|
install_header(${CMAKE_SOURCE_DIR}/COPYRIGHT devel)
|
||||||
|
|||||||
@ -50,8 +50,10 @@ else()
|
|||||||
install(FILES ${CMAKE_BINARY_DIR}/maxscale.conf DESTINATION /etc/ld.so.conf.d COMPONENT core)
|
install(FILES ${CMAKE_BINARY_DIR}/maxscale.conf DESTINATION /etc/ld.so.conf.d COMPONENT core)
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/maxscale.service DESTINATION /usr/lib/systemd/system COMPONENT core)
|
install(FILES ${CMAKE_BINARY_DIR}/maxscale.service DESTINATION /usr/lib/systemd/system COMPONENT core)
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/upstart/maxscale.conf DESTINATION /etc/init/)
|
install(FILES ${CMAKE_BINARY_DIR}/upstart/maxscale.conf DESTINATION /etc/init/)
|
||||||
|
install(FILES ${CMAKE_SOURCE_DIR}/etc/logrotate.d/maxscale_logrotate DESTINATION /etc/logrotate.d/)
|
||||||
message(STATUS "Installing maxscale.conf to: /etc/ld.so.conf.d")
|
message(STATUS "Installing maxscale.conf to: /etc/ld.so.conf.d")
|
||||||
message(STATUS "Installing startup scripts to: /etc/init.d")
|
message(STATUS "Installing startup scripts to: /etc/init.d")
|
||||||
message(STATUS "Installing systemd service files to: /usr/lib/systemd/system")
|
message(STATUS "Installing systemd service files to: /usr/lib/systemd/system")
|
||||||
message(STATUS "Installing upstart files to: /etc/init/")
|
message(STATUS "Installing upstart files to: /etc/init/")
|
||||||
|
message(STATUS "Installing logrotate config to: /etc/logrotate.d/maxscale_logrotate")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
11
etc/logrotate.d/maxscale_logrotate
Normal file
11
etc/logrotate.d/maxscale_logrotate
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/var/log/maxscale/maxscale.log {
|
||||||
|
monthly
|
||||||
|
rotate 5
|
||||||
|
missingok
|
||||||
|
nocompress
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
kill -USR1 `cat /var/run/maxscale/maxscale.pid`
|
||||||
|
endscript
|
||||||
|
}
|
||||||
|
|
||||||
@ -73,6 +73,12 @@ then
|
|||||||
cp @MAXSCALE_CONFDIR@/maxscale.cnf.template @MAXSCALE_CONFDIR@/maxscale.cnf
|
cp @MAXSCALE_CONFDIR@/maxscale.cnf.template @MAXSCALE_CONFDIR@/maxscale.cnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If no logrotate config file is found, create one
|
||||||
|
if [ ! -f "etc/logrotate.d/maxscale_logrotate" ]
|
||||||
|
then
|
||||||
|
cp @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxscale_logrotate /etc/logrotate.d/maxscale_logrotate
|
||||||
|
fi
|
||||||
|
|
||||||
# This will allow us to install the Perl scripts as executable files
|
# This will allow us to install the Perl scripts as executable files
|
||||||
# without adding the Perl dependencies
|
# without adding the Perl dependencies
|
||||||
find @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/plugins/nagios -name '*.pl' -exec chmod ug+x {} \;
|
find @CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/plugins/nagios -name '*.pl' -exec chmod ug+x {} \;
|
||||||
|
|||||||
@ -22,4 +22,9 @@ then
|
|||||||
then
|
then
|
||||||
rm /lib/systemd/system/maxscale.service
|
rm /lib/systemd/system/maxscale.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/logrotate.d/maxscale_logrotate ]
|
||||||
|
then
|
||||||
|
rm /etc/logrotate.d/maxscale_logrotate
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user