logrotate as daemon, logfile 5000

This commit is contained in:
oliver
2026-08-14 16:47:31 -03:00
parent 729b24edd8
commit c8111645e4
4 changed files with 45 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/sbin/openrc-run
name="rotateLogs"
description="Daily Odoo log rotation"
pidfile="/run/${RC_SVCNAME}.pid"
output_log="/4server/data/log/rotateLogs.log"
error_log="/4server/data/log/rotateLogs.log"
command="/4server/sbin/rotateLogs"
command_background="yes"
stop() {
ebegin "Stopping rotateLogs"
start-stop-daemon --stop --pidfile "$pidfile"
eend $?
}
depend() {
need localmount
after bootmisc
}