diff --git a/opt/CMakeLists.txt b/opt/CMakeLists.txt index 3fa3ca2..97a2a90 100644 --- a/opt/CMakeLists.txt +++ b/opt/CMakeLists.txt @@ -11,6 +11,11 @@ configure_file( "${CMAKE_CURRENT_BINARY_DIR}/nwserv.conf" IMMEDIATE @ONLY) +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/nwserv.logrotate.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/nwserv.logrotate" + IMMEDIATE @ONLY) + ################################# # Compiler Switches ############## @@ -52,6 +57,7 @@ add_executable( xsockrt xsockrt.c ) ############## install(FILES ${CMAKE_CURRENT_BINARY_DIR}/nwserv.conf DESTINATION ${MARS_NWE_INSTALL_FULL_CONFDIR}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/nwserv.logrotate DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/logrotate.d rename mars_nwe) install(FILES nwserv.stations DESTINATION ${MARS_NWE_INSTALL_FULL_CONFDIR}) install(FILES nw.ini.cnv.437 DESTINATION ${MARS_NWE_INSTALL_FULL_CONFDIR} RENAME nwserv.cnv.437) install(FILES nw.ini.cnv.cyr DESTINATION ${MARS_NWE_INSTALL_FULL_CONFDIR} RENAME nwserv.cnv.cyr) diff --git a/opt/nwserv.logrotate b/opt/nwserv.logrotate deleted file mode 100644 index 3dacd28..0000000 --- a/opt/nwserv.logrotate +++ /dev/null @@ -1,11 +0,0 @@ -/var/log/nw.log { - postrotate - /bin/killall -HUP nwserv - endrotate -} - -/var/log/nw.routes { - postrotate - /bin/killall -HUP nwserv - endrotate -} diff --git a/opt/nwserv.logrotate.cmake b/opt/nwserv.logrotate.cmake new file mode 100644 index 0000000..dfd51aa --- /dev/null +++ b/opt/nwserv.logrotate.cmake @@ -0,0 +1,23 @@ +@MARS_NWE_LOG_DIR@/nw.log { + postrotate + /bin/killall -HUP nwserv + endrotate +} + +@MARS_NWE_LOG_DIR@/nw.routes { + postrotate + /bin/killall -HUP nwserv + endrotate +} + +@MARS_NWE_LOG_DIR@/nwwebui.log { + postrotate + /bin/killall -HUP nwwebui + endrotate +} + +@MARS_NWE_LOG_DIR@/smart.log { + postrotate + /bin/killall -HUP nwwebui + endrotate +}