forked from ventor-tech/odoo-install-script
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogrotate.sh
More file actions
28 lines (25 loc) · 715 Bytes
/
logrotate.sh
File metadata and controls
28 lines (25 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# ------------------------------------------------------
# Logrotate installation section
# ------------------------------------------------------
echo -e "Install logrotate"
#--------------------------------------------------
# Install Libraries needed for let's encrypt
#--------------------------------------------------
sudo apt-get install -y logrotate
cat <<EOF > /etc/logrotate.d/odoo
#Path odoo logs
$OE_LOG_PATH/*.log {
rotate 90
daily
compress
dateext
delaycompress
missingok
notifempty
postrotate
service odoo-$OE_VERSION-server restart
endscript
create 640 odoo adm
}
EOF