forked from evolix/ansible-roles
userlogrotate: rotate also php.log
This commit is contained in:
parent
5c60fad29c
commit
9821fc8f78
|
@ -12,6 +12,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
|||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
* userlogrotate: rotate also php.log.
|
||||
|
||||
### Changed
|
||||
* evolinux-users: remove Stretch references in tasks that also apply to next Debian versions.
|
||||
|
|
|
@ -15,7 +15,7 @@ user_for() {
|
|||
stat -L -c '%G' $homedir
|
||||
}
|
||||
|
||||
for log in access.log access-*.log error.log; do
|
||||
for log in access.log access-*.log error.log php.log; do
|
||||
for i in $(ls -1 -d $HOMEPREFIX/*/log/$log 2>/dev/null | grep -v \.bak\.); do
|
||||
USER="$(user_for $i)"
|
||||
rotate $i root:$USER
|
||||
|
@ -55,4 +55,4 @@ for log in production.log*[!\.gz] delayed_job.log*[!\.gz] development.log*[!\.gz
|
|||
done
|
||||
done
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue