File tree Expand file tree Collapse file tree
rsconf/package_data/logrotate
tests/pkcli/build1_data/1.out/srv/host/v3.radia.run Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
2+ shopt -s nullglob
23
34logrotate_main () {
45 # We use a systemd timer so can have output in the journal, and not emailed (anacron requires email)
@@ -15,6 +16,12 @@ logrotate_main() {
1516 rsconf_edit_no_change_res=0 rsconf_edit /etc/logrotate.d/nginx ' #rotate' \
1617 ' s/\brotate/#rotate/'
1718 fi
19+ for f in /etc/logrotate.d/* ; do
20+ if grep --no-messages --quiet ' delaycompress' " $f " ; then
21+ rsconf_edit_no_change_res=0 rsconf_edit " $f " ' #delaycompress' \
22+ ' s/\bdelaycompress/#delaycompress/'
23+ fi
24+ done
1825 # Must exist for logrotate.conf.jinja to export and rotate the journal
1926 if [[ ! -e /var/log/journal.export ]]; then
2027 install -m 600 -o root -g root /dev/null /var/log/journal.export
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ rsconf_install_file '/etc/logrotate.conf' 'c59f3376adf6ef244541b8ae596cc304'
1515logrotate_main
1616}
1717#! /bin/bash
18+ shopt -s nullglob
1819
1920logrotate_main () {
2021 # We use a systemd timer so can have output in the journal, and not emailed (anacron requires email)
@@ -31,6 +32,12 @@ logrotate_main() {
3132 rsconf_edit_no_change_res=0 rsconf_edit /etc/logrotate.d/nginx ' #rotate' \
3233 ' s/\brotate/#rotate/'
3334 fi
35+ for f in /etc/logrotate.d/* ; do
36+ if grep --no-messages --quiet ' delaycompress' " $f " ; then
37+ rsconf_edit_no_change_res=0 rsconf_edit " $f " ' #delaycompress' \
38+ ' s/\bdelaycompress/#delaycompress/'
39+ fi
40+ done
3441 # Must exist for logrotate.conf.jinja to export and rotate the journal
3542 if [[ ! -e /var/log/journal.export ]]; then
3643 install -m 600 -o root -g root /dev/null /var/log/journal.export
You can’t perform that action at this time.
0 commit comments