Also pidof -> pgrep in gravity.sh

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2020-07-21 21:39:59 +02:00
parent 8f7f0881c6
commit 527fc3c5cf
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD

View file

@ -43,8 +43,6 @@ optimize_database=false
domainsExtension="domains"
resolver="pihole-FTL"
# Source setupVars from install script
setupVars="${piholeDir}/setupVars.conf"
if [[ -f "${setupVars}" ]];then
@ -284,7 +282,7 @@ gravity_CheckDNSResolutionAvailable() {
fi
# Determine error output message
if pidof ${resolver} &> /dev/null; then
if pgrep pihole-FTL &> /dev/null; then
echo -e " ${CROSS} DNS resolution is currently unavailable"
else
echo -e " ${CROSS} DNS service is not running"
@ -746,7 +744,7 @@ gravity_Cleanup() {
fi
# Only restart DNS service if offline
if ! pidof ${resolver} &> /dev/null; then
if ! pgrep pihole-FTL &> /dev/null; then
"${PIHOLE_COMMAND}" restartdns
dnsWasOffline=true
fi