Skip to content

Commit

Permalink
Fix some bugs.
Browse files Browse the repository at this point in the history
Signed-off-by: Van Waholtz <vanwaholtz@gmail.com>
  • Loading branch information
Van Waholtz committed May 4, 2020
1 parent 99efc9a commit be55f76
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Compared with the original one, this version has made some changes:
4. Many other details.

# Download
[v1.2.0](https://github.com/brvphoenix/wrtbwmon/releases/download/v1.2.0/wrtbwmon_1.2.0-1_all.ipk)
[v1.2.1](https://github.com/brvphoenix/wrtbwmon/releases/download/v1.2.1/wrtbwmon_1.2.1-1_all.ipk)
4 changes: 2 additions & 2 deletions wrtbwmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=wrtbwmon
PKG_VERSION:=1.2.0
PKG_VERSION:=1.2.1
PKG_RELEASE:=1

include $(INCLUDE_DIR)/package.mk

define Package/wrtbwmon
SECTION:=net
CATEGORY:=Network
DEPENDS:=+busybox +iptables @!BUSYBOX_DEFAULT_IP:ip-full
DEPENDS:=+busybox +iptables +!BUSYBOX_DEFAULT_IP:ip-full
TITLE:=A Traffic Usage Monitor
SUBMENU:=Tools
PKGARCH:=all
Expand Down
5 changes: 2 additions & 3 deletions wrtbwmon/net/etc/init.d/wrtbwmon
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ start_service() {
config_load $NAME

config_get db general path
[ -z "$dbpath" ] && dbpath="/tmp/usage.db"
[ -z "$db" ] && db="/tmp/usage.db"
append args " -46"
append args "-f $dbpath"
append args "-f $db"
append args "-p /tmp/usage.htm"
append args "-u /etc/wrtbwmon.user"
append args "-d"
Expand All @@ -42,4 +42,3 @@ stop_service() {
procd_kill wrtbwmon
kill -CONT $(cat $PID_FILE)
}

4 changes: 2 additions & 2 deletions wrtbwmon/net/usr/sbin/wrtbwmon
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ ending() {
checkPid() {
[ -e "$1" ] && local pid=$(cat $1) || return 1
[ -d "/proc/$pid" ] && {
[ -n $(echo $(cat "/proc/$pid/cmdline") | grep wrtbwmon ) ] && return 0
[ -n "$( cat /proc/$pid/cmdline | grep wrtbwmon )" ] && return 0
}
return 1
}
Expand All @@ -352,7 +352,7 @@ loop() {
local SPID=
echo $loopPID > $pidFile
while true ;do
[ -n $SPID ] && kill -9 $SPID >>/dev/null 2>&1
[ -n "$SPID" ] && kill -9 $SPID >>/dev/null 2>&1
sleepProcess $loopPID &
SPID=$!
updatePrepare && update
Expand Down

0 comments on commit be55f76

Please sign in to comment.