debian/cubicweb-ctl.logrotate
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 08 Nov 2016 18:37:47 +0100
branch3.24
changeset 11808 4a387179fa33
parent 5840 60880c81e32e
permissions -rw-r--r--
[migration] Drop cw_schema relation first without this, we ends up with the traceback shown at https://www.cubicweb.org/ticket/16130960. This is not the proper fix, which I have not been able to find. It seems due to this very rare case of deletion of such relation linked to CWRType vs order of execution of operation (in this case, the operation deleting the entity table is run before some other queries using it). As forcing this relation to be deleted before the entity type fixes the problem while this case seems rare enough, IMO this patch is "good enough". Closes #16130960
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     1
/var/log/cubicweb/*.log {
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     2
        weekly
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     3
        missingok
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     4
        rotate 10
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     5
        compress
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     6
        delaycompress
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     7
        notifempty
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     8
        create 640 root adm
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     9
        sharedscripts
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    10
        postrotate
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    11
           if [ -x /usr/sbin/invoke-rc.d ]; then \
5840
60880c81e32e [debian] fix logrotate error introduced by 5806:9ef0e95f4d2b: sh don't want spaces here
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5806
diff changeset
    12
              invoke-rc.d cubicweb reload > /dev/null 2>&1; \
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    13
           else \
5840
60880c81e32e [debian] fix logrotate error introduced by 5806:9ef0e95f4d2b: sh don't want spaces here
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5806
diff changeset
    14
              /etc/init.d/cubicweb reload > /dev/null 2>&1; \
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    15
           fi; \
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    16
        endscript
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    17
}