Add luci for new feature, and fix some bugs

This commit is contained in:
Nick Peng
2018-12-25 01:55:37 +08:00
parent 11552f906f
commit 9398573e6f
10 changed files with 114 additions and 36 deletions

View File

@@ -51,7 +51,7 @@ case "$1" in
fi
;;
status)
pid="`cat $SMARTDNS_PID 2>/dev/null`"
pid="`cat $SMARTDNS_PID |head -n 1 2>/dev/null`"
if [ -z "$pid" ]; then
echo "smartdns not running."
return 0
@@ -66,7 +66,16 @@ case "$1" in
;;
stop)
clear_iptable
pid="`cat $SMARTDNS_PID 2>/dev/null`"
pid="`cat $SMARTDNS_PID | head -n 1 2>/dev/null`"
if [ -z "$pid" ]; then
echo "smartdns not running."
return 0
fi
if [ ! -d "/proc/$pid" ]; then
return 0;
fi
kill -9 $pid 2>/dev/null
;;
force-reload|restart)