shadowsocks-libev: flush ss rules on entry
authorYousong Zhou <yszhou4tech@gmail.com>
Mon, 11 Feb 2019 13:21:04 +0000 (13:21 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Mon, 11 Feb 2019 13:30:43 +0000 (13:30 +0000)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
net/shadowsocks-libev/Makefile
net/shadowsocks-libev/files/shadowsocks-libev.init

index e96642f0932515af0e69eb3a2f5567eb1a9d9ca4..3d307448e510789b71a89d3fe3dab5c798291e5b 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2017-2018 Yousong Zhou <yszhou4tech@gmail.com>
+# Copyright (C) 2017-2019 Yousong Zhou <yszhou4tech@gmail.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
 #
 PKG_NAME:=shadowsocks-libev
 PKG_VERSION:=3.1.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
index 22d825d0b1bddde32db38337c2135615a1ae2e9f..88c1c2429b1dedf0a51dbc222406123b53c624c8 100644 (file)
@@ -144,12 +144,14 @@ ss_rules() {
        local args
 
        [ -x "$bin" ] || return 1
+       "$bin" -f
+
        config_get cfgtype "$cfg" TYPE
        [ "$cfgtype" = ss_rules ] || return 1
 
        eval "$(validate_ss_rules_section "$cfg" ss_validate_mklocal)"
        validate_ss_rules_section "$cfg" || return 1
-       [ "$disabled" = 0 ] || return 1
+       [ "$disabled" = 0 ] || return 0
 
        eval local_port_tcp="\$ss_rules_redir_tcp_$redir_tcp"
        eval local_port_udp="\$ss_rules_redir_udp_$redir_udp"