logrotate.patch
eole/posttemplate/00-eole-common | ||
---|---|---|
51 | 51 |
if [[ ! "$LOGROTATED_DIR" =~ $RSYSLOG_GLOB_DIR ]]; then |
52 | 52 |
RSYSLOG_DIR="$RSYSLOG_GLOB_DIR" |
53 | 53 |
fi |
54 |
RSYSLOG_DIRS="$RSYSLOG_DIRS $RSYSLOG_DIR" |
|
54 |
if [[ ! "$LOGROTATED_DIR" =~ $RSYSLOG_DIR ]] && [[ ! "$RSYSLOG_DIRS" =~ $RSYSLOG_DIR ]]; then |
|
55 | 55 |
cat<<EOT>>/etc/logrotate.d/generated_local_rules |
56 | 56 | |
57 | 57 |
$RSYSLOG_DIR { |
... | ... | |
64 | 64 |
endscript |
65 | 65 |
} |
66 | 66 |
EOT |
67 |
RSYSLOG_DIRS="$RSYSLOG_DIRS $RSYSLOG_DIR" |
|
68 |
fi |
|
67 | 69 |
fi |
68 | 70 |
fi |
69 | 71 |
done |
... | ... | |
78 | 80 |
if [[ ! "$LOGROTATED_DIR" =~ $RSYSLOG_GLOB_DIR ]]; then |
79 | 81 |
RSYSLOG_DIR="$RSYSLOG_GLOB_DIR" |
80 | 82 |
fi |
81 |
RSYSLOG_DIRS="$RSYSLOG_DIRS $RSYSLOG_DIR" |
|
83 |
if [[ ! "$LOGROTATED_DIR" =~ $RSYSLOG_DIR ]] && [[ ! "$RSYSLOG_DIRS" =~ $RSYSLOG_DIR ]]; then |
|
82 | 84 |
cat<<EOT>>/etc/logrotate.d/generated_remote_rules |
83 | 85 | |
84 | 86 |
$RSYSLOG_DIR { |
... | ... | |
91 | 93 |
endscript |
92 | 94 |
} |
93 | 95 |
EOT |
96 |
RSYSLOG_DIRS="$RSYSLOG_DIRS $RSYSLOG_DIR" |
|
97 |
fi |
|
94 | 98 |
fi |
95 | 99 |
fi |
96 | 100 |
done |