on xenial help sign in
Start logrotate in the greeter's session.
0635f31Michael Terry
data/CMakeLists.txt+1−1
@@ -15,6 +15,6 @@ install(FILES 51-${GREETER_APP}.conf
15install(FILES ${GREETER_APP}-wrapper
15install(FILES ${GREETER_APP}-wrapper
16 DESTINATION ${CMAKE_INSTALL_BINDIR}
16 DESTINATION ${CMAKE_INSTALL_BINDIR}
17 )
17 )
18−install(FILES ${GREETER_APP}-init.conf
18+install(FILES ${GREETER_APP}-init.conf ${GREETER_APP}-logrotate.conf
19 DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions
19 DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions
20 )
20 )
data/unity8-greeter-logrotate.confnew file+14
@@ -0,0 +1,14 @@
1+description "Unity 8 Greeter logrotate support"
2+author "Michael Terry <mterry@ubuntu.com>"
3+
4+start on unity8-greeter-started
5+task
6+
7+script
8+ # logrotate normally starts on startup and then sleeps for 60 seconds.
9+ # Otherwise, it skips that sleep. Since we can't emit the startup signal
10+ # for a unity8-greeter session, we have to trigger logrotate manually.
11+ # So we do the sleep ourselves in its stead.
12+ sleep 60
13+ initctl emit :sys:rotate-logs
14+end script