mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 22:00:17 +00:00
Change how user and group are stored in the logrotate config file (necessary on Ubuntu 16.04.1)
This commit is contained in:
parent
55d39595e1
commit
8b22f435ad
2 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
/var/log/pihole.log {
|
/var/log/pihole.log {
|
||||||
|
# su #
|
||||||
daily
|
daily
|
||||||
copytruncate
|
copytruncate
|
||||||
rotate 5
|
rotate 5
|
||||||
|
|
|
@ -949,7 +949,7 @@ installLogrotate() {
|
||||||
# the local properties of the /var/log directory
|
# the local properties of the /var/log directory
|
||||||
logusergroup="$(stat -c '%U %G' /var/log)"
|
logusergroup="$(stat -c '%U %G' /var/log)"
|
||||||
if [[ ! -z $logusergroup ]]; then
|
if [[ ! -z $logusergroup ]]; then
|
||||||
echo "su ${logusergroup}" >> /etc/pihole/logrotate
|
sed -i "s/# su #/su ${logusergroup}/" /etc/pihole/logrotate
|
||||||
fi
|
fi
|
||||||
echo " done!"
|
echo " done!"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue