mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-21 21:53:43 +00:00
Remove temporal log file symlink code. It was introduced 2 years ago with v5.11 and always thought to be temporarily only
Signed-off-by: Christian König <github@yubiuser.dev>
This commit is contained in:
parent
db1431a1ae
commit
1ed5994fa5
2 changed files with 0 additions and 40 deletions
|
@ -32,15 +32,3 @@ find /etc/pihole -type d -exec chmod 0755 {} \;
|
|||
[ -f /var/log/pihole/FTL.log ] || install -m 640 -o pihole -g pihole /dev/null /var/log/pihole/FTL.log
|
||||
[ -f /var/log/pihole/pihole.log ] || install -m 640 -o pihole -g pihole /dev/null /var/log/pihole/pihole.log
|
||||
[ -f /etc/pihole/dhcp.leases ] || install -m 644 -o pihole -g pihole /dev/null /etc/pihole/dhcp.leases
|
||||
|
||||
|
||||
# Backward compatibility for user-scripts that still expect log files in /var/log instead of /var/log/pihole
|
||||
# Should be removed with Pi-hole v6.0
|
||||
if [ ! -f /var/log/pihole.log ]; then
|
||||
ln -sf /var/log/pihole/pihole.log /var/log/pihole.log
|
||||
chown -h pihole:pihole /var/log/pihole.log
|
||||
fi
|
||||
if [ ! -f /var/log/pihole-FTL.log ]; then
|
||||
ln -sf /var/log/pihole/FTL.log /var/log/pihole-FTL.log
|
||||
chown -h pihole:pihole /var/log/pihole-FTL.log
|
||||
fi
|
||||
|
|
|
@ -2323,34 +2323,6 @@ main() {
|
|||
# the service before enabling causes installer to exit
|
||||
enable_service pihole-FTL
|
||||
|
||||
# If this is an update from a previous Pi-hole installation
|
||||
# we need to move any existing `pihole*` logs from `/var/log` to `/var/log/pihole`
|
||||
# if /var/log/pihole.log is not a symlink (set during FTL startup) move the files
|
||||
# can be removed with Pi-hole v6.0
|
||||
# To be sure FTL is not running when we move the files we explicitly stop it here
|
||||
|
||||
stop_service pihole-FTL &>/dev/null
|
||||
|
||||
if [ ! -d /var/log/pihole/ ]; then
|
||||
mkdir -m 0755 /var/log/pihole/
|
||||
fi
|
||||
|
||||
# Special handling for pihole-FTL.log -> pihole/FTL.log
|
||||
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.1 -> /var/log/pihole/FTL.log.1
|
||||
# /var/log/pihole-FTL.log.2.gz -> /var/log/pihole/FTL.log.2.gz
|
||||
# /var/log/pihole-FTL.log.3.gz -> /var/log/pihole/FTL.log.3.gz
|
||||
# /var/log/pihole-FTL.log.4.gz -> /var/log/pihole/FTL.log.4.gz
|
||||
# /var/log/pihole-FTL.log.5.gz -> /var/log/pihole/FTL.log.5.gz
|
||||
for f in /var/log/pihole-FTL.log*; do mv "$f" "$(sed "s/pihole-/pihole\//" <<<"$f")"; done
|
||||
fi
|
||||
|
||||
# Remaining log files
|
||||
if [ -f /var/log/pihole.log ] && [ ! -L /var/log/pihole.log ]; then
|
||||
mv /var/log/pihole*.* /var/log/pihole/ 2>/dev/null
|
||||
fi
|
||||
|
||||
restart_service pihole-FTL
|
||||
|
||||
# Download and compile the aggregated block list
|
||||
|
|
Loading…
Reference in a new issue