[IMP] point_of_sale: do more aggresive logrotate on rsyslog logs
/var/log/syslog gets filled up quicker than usual because of all the crontab logs: Aug 26 09:29:01 raspberrypi /USR/SBIN/CRON[21223]: (root) CMD (rm /var/run/odoo/sessions/*)
This commit is contained in:
parent
02f0cbe353
commit
1db1027cd5
|
@ -56,6 +56,12 @@ sudo -u postgres createuser -s pi
|
||||||
mkdir /var/log/odoo
|
mkdir /var/log/odoo
|
||||||
chown pi:pi /var/log/odoo
|
chown pi:pi /var/log/odoo
|
||||||
|
|
||||||
|
# logrotate is very picky when it comes to file permissions
|
||||||
|
chown -R root:root /etc/logrotate.d/
|
||||||
|
chmod -R 644 /etc/logrotate.d/
|
||||||
|
chown root:root /etc/logrotate.conf
|
||||||
|
chmod 644 /etc/logrotate.conf
|
||||||
|
|
||||||
echo "* * * * * rm /var/run/odoo/sessions/*" | crontab -
|
echo "* * * * * rm /var/run/odoo/sessions/*" | crontab -
|
||||||
|
|
||||||
update-rc.d odoo defaults
|
update-rc.d odoo defaults
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
/var/log/syslog
|
||||||
|
{
|
||||||
|
rotate 3
|
||||||
|
daily
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
delaycompress
|
||||||
|
compress
|
||||||
|
postrotate
|
||||||
|
invoke-rc.d rsyslog rotate > /dev/null
|
||||||
|
endscript
|
||||||
|
}
|
||||||
|
|
||||||
|
/var/log/mail.info
|
||||||
|
/var/log/mail.warn
|
||||||
|
/var/log/mail.err
|
||||||
|
/var/log/mail.log
|
||||||
|
/var/log/daemon.log
|
||||||
|
/var/log/kern.log
|
||||||
|
/var/log/auth.log
|
||||||
|
/var/log/user.log
|
||||||
|
/var/log/lpr.log
|
||||||
|
/var/log/cron.log
|
||||||
|
/var/log/debug
|
||||||
|
/var/log/messages
|
||||||
|
{
|
||||||
|
rotate 3
|
||||||
|
daily
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
invoke-rc.d rsyslog rotate > /dev/null
|
||||||
|
endscript
|
||||||
|
}
|
Loading…
Reference in New Issue