1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-27 10:50:10 +03:00

bug #4365: rotate logs on oned or sunstone start

Sent by: Bill Cole
This commit is contained in:
Javi Fontan 2016-05-20 12:30:40 +02:00
parent 1bef231fa5
commit 50fb192eea
3 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,7 @@ Group=oneadmin
User=oneadmin
ExecStart=/usr/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb
ExecStartPre=/sbin/logrotate -s /tmp/logrotate.state -f /etc/logrotate.d/opennebula
PIDFile=/var/run/one/sunstone.pid
[Install]

View File

@ -18,6 +18,7 @@ ExecStart=/usr/bin/oned -f
# Log file location must exist
ExecStartPre=/bin/mkdir -p /var/log/one
ExecStartPre=/bin/chown oneadmin:oneadmin /var/log/one
ExecStartPre=/sbin/logrotate -s /tmp/logrotate.state -f /etc/logrotate.d/opennebula
ExecStop=/bin/kill -TERM $MAINPID
PIDFile=/var/run/one/oned.pid

View File

@ -1,3 +1,7 @@
delaycompress
dateext
dateformat -%Y%m%d-%s
compress
weekly
rotate 52