Browse Source

optware: fix init script restart dnsmasq failure.

Nick Peng 2 years ago
parent
commit
8befd9d5d2
1 changed files with 1 additions and 2 deletions
  1. 1 2
      package/optware/S50smartdns

+ 1 - 2
package/optware/S50smartdns

@@ -121,8 +121,7 @@ restart_dnsmasq()
 		PID2="$(echo "$CMD" | awk 'NR==2{print $1}')"
 		PID2_PPID="$(grep 'PPid:' /proc/$PID2/status | awk '{print $2}' 2>/dev/null)"
 		if [ "$PID2_PPID" != "$PID1" ]; then
-			echo "find multiple dnsmasq, but not started by the same process"
-			return 1
+			kill -9 "$PID2"
 		fi
 		PID=$PID1
 	else