mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Actually check for dnsmasq's existence before attempting to interact with it's service
Signed-off-by: Adam Warner <adamw@rner.email>
This commit is contained in:
parent
90239bb969
commit
76654c7856
1 changed files with 12 additions and 8 deletions
|
@ -1933,12 +1933,14 @@ FTLinstall() {
|
||||||
popd > /dev/null || { echo "Unable to return to original directory after FTL binary download."; return 1; }
|
popd > /dev/null || { echo "Unable to return to original directory after FTL binary download."; return 1; }
|
||||||
# Install the FTL service
|
# Install the FTL service
|
||||||
echo -e "${OVER} ${TICK} ${str}"
|
echo -e "${OVER} ${TICK} ${str}"
|
||||||
# dnsmasq can now be stopped and disabled
|
# dnsmasq can now be stopped and disabled if it exists
|
||||||
|
if which dnsmasq > /dev/null; then
|
||||||
if check_service_active "dnsmasq";then
|
if check_service_active "dnsmasq";then
|
||||||
echo " ${INFO} FTL can now resolve DNS Queries without dnsmasq running separately"
|
echo " ${INFO} FTL can now resolve DNS Queries without dnsmasq running separately"
|
||||||
stop_service dnsmasq
|
stop_service dnsmasq
|
||||||
disable_service dnsmasq
|
disable_service dnsmasq
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#ensure /etc/dnsmasq.conf contains `conf-dir=/etc/dnsmasq.d`
|
#ensure /etc/dnsmasq.conf contains `conf-dir=/etc/dnsmasq.d`
|
||||||
confdir="conf-dir=/etc/dnsmasq.d"
|
confdir="conf-dir=/etc/dnsmasq.d"
|
||||||
|
@ -2051,10 +2053,12 @@ FTLcheckUpdate()
|
||||||
local remoteSha1
|
local remoteSha1
|
||||||
local localSha1
|
local localSha1
|
||||||
|
|
||||||
# if dnsmasq is running at this point, force reinstall of FTL Binary
|
# if dnsmasq exists and is running at this point, force reinstall of FTL Binary
|
||||||
|
if which dnsmasq > /dev/null; then
|
||||||
if check_service_active "dnsmasq";then
|
if check_service_active "dnsmasq";then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! "${ftlBranch}" == "master" ]]; then
|
if [[ ! "${ftlBranch}" == "master" ]]; then
|
||||||
#Check whether or not the binary for this FTL branch actually exists. If not, then there is no update!
|
#Check whether or not the binary for this FTL branch actually exists. If not, then there is no update!
|
||||||
|
|
Loading…
Reference in a new issue