mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2024-06-28 12:11:04 +02:00
install the logrotate file into /etc/pihole at startup in case of volume mounting
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
b9298ba0ce
commit
7f89be5b1d
|
@ -40,6 +40,7 @@ ensure_basic_configuration() {
|
||||||
touch /var/log/pihole/FTL.log /var/log/pihole/pihole.log
|
touch /var/log/pihole/FTL.log /var/log/pihole/pihole.log
|
||||||
chown -R pihole:pihole /var/run/pihole /var/log/pihole
|
chown -R pihole:pihole /var/run/pihole /var/log/pihole
|
||||||
|
|
||||||
|
|
||||||
if [[ -z "${PYTEST}" ]]; then
|
if [[ -z "${PYTEST}" ]]; then
|
||||||
if [[ ! -f /etc/pihole/adlists.list ]]; then
|
if [[ ! -f /etc/pihole/adlists.list ]]; then
|
||||||
echo "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" >/etc/pihole/adlists.list
|
echo "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" >/etc/pihole/adlists.list
|
||||||
|
@ -54,6 +55,11 @@ ensure_basic_configuration() {
|
||||||
setFTLConfigValue "files.macvendor" "/macvendor.db"
|
setFTLConfigValue "files.macvendor" "/macvendor.db"
|
||||||
chown pihole:pihole /macvendor.db
|
chown pihole:pihole /macvendor.db
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Install the logrotate config file - this is done already in Dockerfile
|
||||||
|
# but if a user has mounted a volume over /etc/pihole, it will have been lost
|
||||||
|
# pihole-FTL-prestart.sh will set the ownership of the file to root:root
|
||||||
|
install -Dm644 -t /etc/pihole /etc/.pihole/advanced/Templates/logrotate
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_web_password() {
|
setup_web_password() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user