Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add weekly logrotation of FTL's log #1509

Merged
merged 1 commit into from Jun 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions advanced/logrotate
Expand Up @@ -8,3 +8,14 @@
notifempty
nomail
}

/var/log/pihole-FTL.log {
# su #
weekly
copytruncate
rotate 3
compress
delaycompress
notifempty
nomail
}
2 changes: 1 addition & 1 deletion automated install/basic-install.sh
Expand Up @@ -1052,7 +1052,7 @@ installLogrotate() {
# the local properties of the /var/log directory
logusergroup="$(stat -c '%U %G' /var/log)"
if [[ ! -z $logusergroup ]]; then
sed -i "s/# su #/su ${logusergroup}/" /etc/pihole/logrotate
sed -i "s/# su #/su ${logusergroup}/g;" /etc/pihole/logrotate
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding global here since there are now two places in advanced/logrotate where this has to be applied

fi
echo " done!"
}
Expand Down