Merge branch 'development' of https://github.com/pi-hole/pi-hole into wheezy_fix2
This commit is contained in:
@@ -544,6 +544,37 @@ version_check_dnsmasq() {
|
||||
else
|
||||
sed -i '/^server=@DNS2@/d' ${dnsmasq_pihole_01_location}
|
||||
fi
|
||||
|
||||
#sed -i "s/@HOSTNAME@/$hostname/" ${dnsmasq_pihole_01_location}
|
||||
|
||||
if [[ -f /etc/hostname ]]; then
|
||||
hostname=$(</etc/hostname)
|
||||
elif [ -x "$(command -v hostname)" ]; then
|
||||
hostname=$(hostname -f)
|
||||
fi
|
||||
|
||||
#Replace IPv4 and IPv6 tokens in 01-pihole.conf for pi.hole resolution.
|
||||
if [[ "${IPv4_address}" != "" ]]; then
|
||||
tmp=${IPv4_address%/*}
|
||||
sed -i "s/@IPv4@/$tmp/" ${dnsmasq_pihole_01_location}
|
||||
else
|
||||
sed -i '/^address=\/pi.hole\/@IPv4@/d' ${dnsmasq_pihole_01_location}
|
||||
sed -i '/^address=\/@HOSTNAME@\/@IPv4@/d' ${dnsmasq_pihole_01_location}
|
||||
fi
|
||||
|
||||
if [[ "${IPv6_address}" != "" ]]; then
|
||||
sed -i "s/@IPv6@/$IPv6_address/" ${dnsmasq_pihole_01_location}
|
||||
else
|
||||
sed -i '/^address=\/pi.hole\/@IPv6@/d' ${dnsmasq_pihole_01_location}
|
||||
sed -i '/^address=\/@HOSTNAME@\/@IPv6@/d' ${dnsmasq_pihole_01_location}
|
||||
fi
|
||||
|
||||
if [[ "${hostname}" != "" ]]; then
|
||||
sed -i "s/@HOSTNAME@/$hostname/" ${dnsmasq_pihole_01_location}
|
||||
else
|
||||
sed -i '/^address=\/@HOSTNAME@*/d' ${dnsmasq_pihole_01_location}
|
||||
fi
|
||||
|
||||
sed -i 's/^#conf-dir=\/etc\/dnsmasq.d$/conf-dir=\/etc\/dnsmasq.d/' ${dnsmasq_conf}
|
||||
}
|
||||
|
||||
@@ -569,6 +600,7 @@ installScripts() {
|
||||
|
||||
install -o "${USER}" -Dm755 -t /opt/pihole/ gravity.sh
|
||||
install -o "${USER}" -Dm755 -t /opt/pihole/ ./advanced/Scripts/*.sh
|
||||
install -o "${USER}" -Dm755 -t /opt/pihole/ ./automated\ install/uninstall.sh
|
||||
install -o "${USER}" -Dm755 -t /usr/local/bin/ pihole
|
||||
|
||||
install -Dm644 ./advanced/bash-completion/pihole /etc/bash_completion.d/pihole
|
||||
@@ -590,6 +622,8 @@ installConfigs() {
|
||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/run/lighttpd
|
||||
mkdir -p /var/cache/lighttpd/compress
|
||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/compress
|
||||
mkdir -p /var/cache/lighttpd/uploads
|
||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/cache/lighttpd/uploads
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
|
Reference in New Issue
Block a user