diff options
author | Christian König <ckoenig@posteo.de> | 2022-05-15 23:30:17 +0300 |
---|---|---|
committer | Christian König <ckoenig@posteo.de> | 2022-05-15 23:30:17 +0300 |
commit | 110e7525523710f7dc29498b744828418a03b7c4 (patch) | |
tree | 741dd52e7993f723e28e4a7d2916383e34678b0f | |
parent | 09611039339f3534a0be4ece0ef666167f0f3294 (diff) |
Move existing log files
Signed-off-by: Christian König <ckoenig@posteo.de>
-rwxr-xr-x | automated install/basic-install.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 2ac713e8..ace56789 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2528,6 +2528,14 @@ main() { # If no setting was found, default to 0 PRIVACY_LEVEL="${PRIVACY_LEVEL:-0}" fi + + # 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 durign FTL startup) move the files + # can be removed with Pi-hole v6.0 + if [ -f /var/log/pihole.log ] && [ ! -L /var/log/pihole.log ]; then + mv /var/log/pihole*.* /var/log/pihole/ 2>/dev/null + fi fi # Download or update the scripts by updating the appropriate git repos clone_or_update_repos |