Merge pull request #1470 from pi-hole/logrotate

Install logrotate
This commit is contained in:
Adam Warner 2023-11-01 17:24:51 +00:00 committed by GitHub
commit f36583446b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -22,6 +22,7 @@ RUN apk add --no-cache \
iproute2-ss \
jq \
libcap \
logrotate \
ncurses \
nmap-ncat \
procps-ng \
@ -61,6 +62,9 @@ RUN cd /etc/.pihole && \
install -Dm755 -t /opt/pihole gravity.sh && \
install -Dm755 -t /opt/pihole ./advanced/Scripts/*.sh && \
install -Dm755 -t /opt/pihole ./advanced/Scripts/COL_TABLE && \
install -Dm755 -d /etc/pihole && \
install -Dm644 -t /etc/pihole ./advanced/Templates/logrotate && \
install -Dm755 -d /var/log/pihole && \
install -Dm755 -t /usr/local/bin pihole && \
install -Dm644 ./advanced/bash-completion/pihole /etc/bash_completion.d/pihole && \
install -T -m 0755 ./advanced/Templates/pihole-FTL-prestart.sh /opt/pihole/pihole-FTL-prestart.sh && \

View File

@ -36,14 +36,10 @@ setFTLConfigValue() {
ensure_basic_configuration() {
echo " [i] Ensuring basic configuration by re-running select functions from basic-install.sh"
# TODO:
# installLogrotate || true #installLogRotate can return 2 or 3, but we are still OK to continue in that case
mkdir -p /var/run/pihole /var/log/pihole
touch /var/log/pihole/FTL.log /var/log/pihole/pihole.log
chown -R pihole:pihole /var/run/pihole /var/log/pihole
mkdir -p /etc/pihole
if [[ -z "${PYTEST}" ]]; then
if [[ ! -f /etc/pihole/adlists.list ]]; then
echo "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" >/etc/pihole/adlists.list