Merge pull request #4791 from pi-hole/master

sync: master to development
This commit is contained in:
yubiuser 2022-07-08 00:02:05 +02:00 committed by GitHub
commit edc808ee89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -2796,6 +2796,11 @@ main() {
stop_service pihole-FTL &> /dev/null stop_service pihole-FTL &> /dev/null
if [ ! -d /var/log/pihole/ ]; then
mkdir /var/log/pihole/
chmod 0775 /var/log/pihole/
fi
# Special handling for pihole-FTL.log -> pihole/FTL.log # Special handling for pihole-FTL.log -> pihole/FTL.log
if [ -f /var/log/pihole-FTL.log ] && [ ! -L /var/log/pihole-FTL.log ]; then if [ -f /var/log/pihole-FTL.log ] && [ ! -L /var/log/pihole-FTL.log ]; then
# /var/log/pihole-FTL.log -> /var/log/pihole/FTL.log # /var/log/pihole-FTL.log -> /var/log/pihole/FTL.log
@ -2809,6 +2814,7 @@ main() {
# Remaining log files # Remaining log files
if [ -f /var/log/pihole.log ] && [ ! -L /var/log/pihole.log ]; then if [ -f /var/log/pihole.log ] && [ ! -L /var/log/pihole.log ]; then
mkdir -p /var/log/pihole/
mv /var/log/pihole*.* /var/log/pihole/ 2>/dev/null mv /var/log/pihole*.* /var/log/pihole/ 2>/dev/null
fi fi