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