Skip to content

Instantly share code, notes, and snippets.

@samveen
Last active April 19, 2022 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samveen/c85cc73f17f660ea401aa993c59a61bb to your computer and use it in GitHub Desktop.
Save samveen/c85cc73f17f660ea401aa993c59a61bb to your computer and use it in GitHub Desktop.
#!/bin/bash
# Origingal source:
# https://github.com/ventor-tech/odoo-install-script/blob/main/logrotate.sh
# RUN AS ROOT
OE_LOG_PATH="/var/log/odoo/log"
cat <<EOF > /etc/logrotate.d/odoo
#Path odoo logs
${OE_LOG_PATH}/*.log {
rotate 4
size 100M
daily
compress
delaycompress
missingok
notifempty
su odoo odoo
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment