Also pidof -> pgrep in gravity.sh

Signed-off-by: DL6ER <dl6er@dl6er.de>
pull/3599/head
DL6ER 4 years ago
parent 8f7f0881c6
commit 527fc3c5cf
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

@ -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

Loading…
Cancel
Save