Fix dnsmasq not found issue

This commit is contained in:
Nick Peng
2019-07-14 18:19:49 +08:00
parent 90d5c7e396
commit 751c1e3a98

View File

@@ -52,11 +52,11 @@ clear_iptable()
restart_dnsmasq()
{
CMD="`ps | grep " dnsmasq" | grep -v grep 2>/dev/null`"
CMD="`ps | grep "dnsmasq" | grep -v grep 2>/dev/null`"
if [ -z "$CMD" ]; then
CMD="`ps | grep "/usr/sbin/dnsmasq" | grep -v grep 2>/dev/null`"
if [ -z "$CMD" ]; then
CMD="`ps ax | grep " dnsmasq" | grep -v grep 2>/dev/null`"
CMD="`ps ax | grep "dnsmasq" | grep -v grep 2>/dev/null`"
if [ -z "$CMD" ]; then
CMD="`ps ax | grep /usr/sbin/dnsmasq | grep -v grep 2>/dev/null`"
fi