debian/cubicweb-ctl.logrotate
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 17 Nov 2016 10:53:04 +0100
branch3.24
changeset 11824 d7ecf6dab085
parent 5840 60880c81e32e
permissions -rw-r--r--
Fix AttributeError for "lang" on repo/client connections This is a regression introduced by b48020a80dc3, which removed call to set_language from the `req._set_user` method. This is fine, but we still want a language on connections, so we've to handle it if necesary in Connection.__enter__ (i.e. once connection is properly open). When using pyramid front-end, which has a users cache, we've to cache its language as well because we must not access its preferred_language method since it's not bound to a proper connection.
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
}